Fix pipeline

This commit is contained in:
Deluan 2023-05-22 17:53:00 -04:00 • committed by Deluan
commit f62231f728
2 changed files with 72 additions and 76 deletions

View file

@ -8,6 +8,7 @@ on:
pull_request:
branches:
- master
jobs:
go-lint:
name: Lint Go code
@ -43,6 +44,28 @@ jobs:
exit 1
fi
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Build and Lint OpenAPI spec
run: make lintapi gen
- name: Verify no changes
run: |
git status --porcelain
if [ -n "$(git status --porcelain)" ]; then
echo 'Changes to OpenAPI spec caused changes to the code. Please review and commit the changes.'
exit 1
fi
- uses: actions/upload-artifact@v3
with:
name: openapi.yaml
path: api/openapi.yaml
go:
name: Test with Go ${{ matrix.go_version }}
runs-on: ubuntu-latest
@ -109,37 +132,9 @@ jobs:
name: js-bundle
path: ui/build
api:
name: Build OpenAPI spec
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- run: make lintapi
- run: make gen
- name: Verify no changes
run: |
git status --porcelain
if [ -n "$(git status --porcelain)" ]; then
echo 'Changes to OpenAPI spec caused changes to the code. Please review and commit the changes.'
exit 1
fi
- uses: actions/upload-artifact@v3
with:
name: openapi.yaml
path: api/openapi.yaml
binaries:
name: Build binaries
needs: [js, go, go-lint, api]
needs: [js, go, go-lint]
runs-on: ubuntu-latest
steps:
- name: Checkout Code