ci: run tests and linter in parallel
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
d351b0086a
commit
35028b5d57
32
.github/workflows/ci.yml
vendored
32
.github/workflows/ci.yml
vendored
@ -7,8 +7,8 @@ on:
|
|||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
lint:
|
||||||
name: Build
|
name: Lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out
|
- name: Check out
|
||||||
@ -27,13 +27,31 @@ jobs:
|
|||||||
echo "Installing cue version $CUE_VERSION"
|
echo "Installing cue version $CUE_VERSION"
|
||||||
curl -L https://github.com/cuelang/cue/releases/download/${CUE_VERSION}/${CUE_TARBALL} | sudo tar zxf - -C /usr/local/bin
|
curl -L https://github.com/cuelang/cue/releases/download/${CUE_VERSION}/${CUE_TARBALL} | sudo tar zxf - -C /usr/local/bin
|
||||||
|
|
||||||
|
# golangci
|
||||||
|
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sudo sh -s -- -b /usr/local/bin v1.23.8
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: |
|
||||||
|
make lint
|
||||||
|
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: 1.16
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: |
|
||||||
# SOPS
|
# SOPS
|
||||||
sudo curl -L -o /usr/local/bin/sops https://github.com/mozilla/sops/releases/download/v3.6.1/sops-v3.6.1.linux
|
sudo curl -L -o /usr/local/bin/sops https://github.com/mozilla/sops/releases/download/v3.6.1/sops-v3.6.1.linux
|
||||||
sudo chmod +x /usr/local/bin/sops
|
sudo chmod +x /usr/local/bin/sops
|
||||||
|
|
||||||
# golangci
|
|
||||||
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sudo sh -s -- -b /usr/local/bin v1.23.8
|
|
||||||
|
|
||||||
- name: Import PGP private key
|
- name: Import PGP private key
|
||||||
env:
|
env:
|
||||||
SOPS_PGP_KEY: ${{ secrets.SOPS_PGP_KEY }}
|
SOPS_PGP_KEY: ${{ secrets.SOPS_PGP_KEY }}
|
||||||
@ -46,10 +64,6 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: |
|
|
||||||
make lint
|
|
||||||
|
|
||||||
- name: Integration test
|
- name: Integration test
|
||||||
run: |
|
run: |
|
||||||
make integration
|
make integration
|
||||||
|
Reference in New Issue
Block a user