mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
refactor(ci): only run go jobs on go changes
This commit is contained in:
@@ -68,6 +68,8 @@ jobs:
|
||||
# - '.github/**'
|
||||
sh:
|
||||
- "**.sh"
|
||||
go:
|
||||
- "**.go"
|
||||
ts:
|
||||
- 'site/**'
|
||||
k8s:
|
||||
@@ -92,6 +94,8 @@ jobs:
|
||||
name: style/lint/golangci
|
||||
timeout-minutes: 5
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
if: needs.changes.outputs.go == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
@@ -284,6 +288,8 @@ jobs:
|
||||
name: "test/go"
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 20
|
||||
needs: changes
|
||||
if: needs.changes.outputs.go == 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
@@ -368,6 +374,8 @@ jobs:
|
||||
# goroutines. Setting this to the timeout +5m should work quite well
|
||||
# even if some of the preceding steps are slow.
|
||||
timeout-minutes: 25
|
||||
needs: changes
|
||||
if: needs.changes.outputs.go == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user