Skip to content

Commit

Permalink
build(gha): run build step before test to avoid nx cache issues
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Jul 10, 2024
1 parent 1bf9ded commit 51886c8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Run bundlewatch'
name: 'Build and run bundlewatch'

on:
workflow_call:
Expand All @@ -7,7 +7,7 @@ env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

jobs:
bundlewatch:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ jobs:
uses: ./.github/workflows/setup.yml
secrets: inherit

bundlewatch:
build:
needs: setup
uses: ./.github/workflows/bundlewatch.yml
uses: ./.github/workflows/build.yml
secrets: inherit

test:
needs: setup
needs: build
uses: ./.github/workflows/test.yml
secrets: inherit

rebase-prs:
needs:
- test
- bundlewatch
- build
uses: ./.github/workflows/rebase-prs.yml
secrets: inherit
14 changes: 4 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,22 @@ jobs:
- uses: myparcelnl/actions/has-refs-between@v4
id: has-refs

# Run setup initially to save cache and time on subsequent jobs
setup:
build:
needs: prepare
if: inputs.force == 'true' || needs.prepare.outputs.has-refs == 'true'
uses: ./.github/workflows/setup.yml
secrets: inherit

bundlewatch:
needs: setup
uses: ./.github/workflows/bundlewatch.yml
uses: ./.github/workflows/build.yml
secrets: inherit

test:
needs: setup
needs: build
uses: ./.github/workflows/test.yml
secrets: inherit

release:
runs-on: ubuntu-22.04
needs:
- test
- bundlewatch
- build
steps:
- uses: myparcelnl/actions/setup-git-credentials@v4
id: credentials
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,11 @@ concurrency:
cancel-in-progress: true

jobs:
# Run setup initially to save cache and time on subsequent jobs
setup:
uses: ./.github/workflows/setup.yml
secrets: inherit

bundlewatch:
needs: setup
uses: ./.github/workflows/bundlewatch.yml
build:
uses: ./.github/workflows/build.yml
secrets: inherit

test:
needs: setup
needs: build
uses: ./.github/workflows/test.yml
secrets: inherit
13 changes: 0 additions & 13 deletions .github/workflows/setup.yml

This file was deleted.

0 comments on commit 51886c8

Please sign in to comment.