|
36 | 36 | ts: ${{ steps.filter.outputs.ts }}
|
37 | 37 | k8s: ${{ steps.filter.outputs.k8s }}
|
38 | 38 | ci: ${{ steps.filter.outputs.ci }}
|
| 39 | + db: ${{ steps.filter.outputs.db }} |
39 | 40 | offlinedocs-only: ${{ steps.filter.outputs.offlinedocs_count == steps.filter.outputs.all_count }}
|
40 | 41 | offlinedocs: ${{ steps.filter.outputs.offlinedocs }}
|
41 | 42 | steps:
|
|
57 | 58 | - "examples/web-server/**"
|
58 | 59 | - "examples/monitoring/**"
|
59 | 60 | - "examples/lima/**"
|
| 61 | + db: |
| 62 | + - "**.sql" |
| 63 | + - "coderd/database/queries/**" |
| 64 | + - "coderd/database/migrations" |
| 65 | + - "coderd/database/sqlc.yaml" |
| 66 | + - "coderd/database/dump.sql" |
60 | 67 | go:
|
61 | 68 | - "**.sql"
|
62 | 69 | - "**.go"
|
@@ -315,7 +322,7 @@ jobs:
|
315 | 322 |
|
316 | 323 | test-go-pg:
|
317 | 324 | runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
|
318 |
| - needs: sqlc-vet |
| 325 | + needs: changes |
319 | 326 | if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
|
320 | 327 | # This timeout must be greater than the timeout set by `go test` in
|
321 | 328 | # `make test-postgres` to ensure we receive a trace of running
|
@@ -915,8 +922,7 @@ jobs:
|
915 | 922 | sqlc-vet:
|
916 | 923 | runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
|
917 | 924 | needs: changes
|
918 |
| - # TODO: We should do this on any migration or query changes. |
919 |
| - # if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main' |
| 925 | + if: needs.changes.outputs.db == 'true' || github.ref == 'refs/heads/main' |
920 | 926 | steps:
|
921 | 927 | - name: Checkout
|
922 | 928 | uses: actions/checkout@v4
|
|
0 commit comments