ci: make test-go-pg depend on sqlc-vet (#11288)

This commit is contained in:
Cian Johnston
2023-12-20 08:47:47 +00:00
committed by GitHub
parent 3ffe7f55aa
commit bfc588955c
+4 -2
View File
@@ -322,7 +322,9 @@ jobs:
test-go-pg:
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
needs: changes
needs:
- changes
- sqlc-vet # No point in testing the DB if the queries are invalid
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
# This timeout must be greater than the timeout set by `go test` in
# `make test-postgres` to ensure we receive a trace of running
@@ -896,7 +898,7 @@ jobs:
sqlc-vet:
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
needs: changes
if: needs.changes.outputs.db == 'true' || github.ref == 'refs/heads/main'
if: needs.changes.outputs.db == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4