Skip to content

Commit 74cd31b

Browse files
authored
Revert "refactor(ci): conditionally run jobs based on file changes (#4242)" (#4321)
This reverts commit f9b7588.
1 parent 88d49db commit 74cd31b

File tree

1 file changed

+6
-28
lines changed

1 file changed

+6
-28
lines changed

.github/workflows/coder.yaml

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,10 @@ jobs:
6464
- '**'
6565
docs:
6666
- 'docs/**'
67+
# For testing:
68+
# - '.github/**'
6769
sh:
6870
- "**.sh"
69-
go:
70-
- "**.go"
71-
tf:
72-
- "**.tf"
7371
ts:
7472
- 'site/**'
7573
k8s:
@@ -94,8 +92,6 @@ jobs:
9492
name: style/lint/golangci
9593
timeout-minutes: 5
9694
runs-on: ubuntu-latest
97-
needs: changes
98-
if: needs.changes.outputs.go == 'true'
9995
steps:
10096
- uses: actions/checkout@v3
10197
- uses: actions/setup-go@v3
@@ -119,8 +115,6 @@ jobs:
119115
name: style/lint/shellcheck
120116
timeout-minutes: 5
121117
runs-on: ubuntu-latest
122-
needs: changes
123-
if: needs.changes.outputs.sh == 'true'
124118
steps:
125119
- uses: actions/checkout@v3
126120
- name: Run ShellCheck
@@ -134,8 +128,6 @@ jobs:
134128
name: "style/lint/typescript"
135129
timeout-minutes: 5
136130
runs-on: ubuntu-latest
137-
needs: changes
138-
if: needs.changes.outputs.ts == 'true'
139131
steps:
140132
- name: Checkout
141133
uses: actions/checkout@v3
@@ -255,8 +247,6 @@ jobs:
255247
name: "style/fmt"
256248
runs-on: ubuntu-latest
257249
timeout-minutes: 5
258-
needs: changes
259-
if: needs.changes.outputs.sh == 'true' || needs.changes.outputs.ts == 'true' || needs.changes.outputs.tf == 'true'
260250
steps:
261251
- name: Checkout
262252
uses: actions/checkout@v3
@@ -290,7 +280,6 @@ jobs:
290280
name: "test/go"
291281
runs-on: ${{ matrix.os }}
292282
timeout-minutes: 20
293-
needs: changes
294283
strategy:
295284
matrix:
296285
os:
@@ -299,36 +288,30 @@ jobs:
299288
- windows-2022
300289
steps:
301290
- uses: actions/checkout@v3
302-
if: needs.changes.outputs.go == 'true'
303291

304292
- uses: actions/setup-go@v3
305-
if: needs.changes.outputs.go == 'true'
306293
with:
307294
go-version: "~1.19"
308295

309296
- name: Echo Go Cache Paths
310-
if: needs.changes.outputs.go == 'true'
311297
id: go-cache-paths
312298
run: |
313299
echo "::set-output name=go-build::$(go env GOCACHE)"
314300
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
315301
316302
- name: Go Build Cache
317-
if: needs.changes.outputs.go == 'true'
318303
uses: actions/cache@v3
319304
with:
320305
path: ${{ steps.go-cache-paths.outputs.go-build }}
321306
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.**', '**.go') }}
322307

323308
- name: Go Mod Cache
324-
if: needs.changes.outputs.go == 'true'
325309
uses: actions/cache@v3
326310
with:
327311
path: ${{ steps.go-cache-paths.outputs.go-mod }}
328312
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
329313

330314
- name: Install gotestsum
331-
if: needs.changes.outputs.go == 'true'
332315
uses: jaxxstorm/action-install-gh-release@v1.7.1
333316
env:
334317
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -337,13 +320,11 @@ jobs:
337320
tag: v1.7.0
338321

339322
- uses: hashicorp/setup-terraform@v2
340-
if: needs.changes.outputs.go == 'true'
341323
with:
342324
terraform_version: 1.1.9
343325
terraform_wrapper: false
344326

345327
- name: Test with Mock Database
346-
if: needs.changes.outputs.go == 'true'
347328
id: test
348329
shell: bash
349330
run: |
@@ -369,7 +350,7 @@ jobs:
369350
# that is no guarantee, see:
370351
# https://github.com/codecov/codecov-action/issues/788
371352
continue-on-error: true
372-
if: steps.test.outputs.cover && github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork && needs.changes.outputs.go == 'true'
353+
if: steps.test.outputs.cover && github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork
373354
with:
374355
token: ${{ secrets.CODECOV_TOKEN }}
375356
files: ./gotests.coverage
@@ -383,8 +364,6 @@ jobs:
383364
# goroutines. Setting this to the timeout +5m should work quite well
384365
# even if some of the preceding steps are slow.
385366
timeout-minutes: 25
386-
needs: changes
387-
if: needs.changes.outputs.go == 'true'
388367
steps:
389368
- uses: actions/checkout@v3
390369

@@ -539,8 +518,6 @@ jobs:
539518
name: "test/js"
540519
runs-on: ubuntu-latest
541520
timeout-minutes: 20
542-
needs: changes
543-
if: needs.changes.outputs.ts == 'true'
544521
steps:
545522
- uses: actions/checkout@v3
546523

@@ -579,8 +556,9 @@ jobs:
579556

580557
test-e2e:
581558
name: "test/e2e/${{ matrix.os }}"
582-
needs: changes
583-
if: needs.changes.outputs.go == 'true' || needs.changes.outputs.ts == 'true' || needs.changes.outputs.tf == 'true'
559+
needs:
560+
- changes
561+
if: needs.changes.outputs.docs-only == 'false'
584562
runs-on: ${{ matrix.os }}
585563
timeout-minutes: 20
586564
strategy:

0 commit comments

Comments
 (0)