Skip to content

Commit

Permalink
CI: let unit-tests run in parallel to the build (#805)
Browse files Browse the repository at this point in the history
Since the build-done job determines pass/fail, we can update the build
dependency to no longer require unit-tests. That allows us to get the
results of the both integration unit tests independently.

* Run go mod download to pre-cache test deps

* Fail build on workflow cancellation
  • Loading branch information
benashz authored Jun 8, 2024
1 parent b1cf1e7 commit e4ee2fa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version-file: .go-version
- name: go mod download all
run: |
# download all dependencies to warm up the module cache
# make sure to run go mod tidy after this since the go.sum file will be updated
go mod download all
- name: go mod tidy
run: |
go mod tidy
Expand Down Expand Up @@ -113,7 +118,6 @@ jobs:
needs:
- get-product-version
- build-pre-checks
- unit-tests
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -416,9 +420,13 @@ jobs:
- build-docker-ubi
- build-docker-ubi-redhat
- chart-upgrade-tests
- unit-tests
- latest-vault
- latest-k8s
steps:
- name: cancelled
if: ${{ (contains(needs.*.result, 'cancelled')) }}
run: exit 2
- name: passed
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
Expand Down

0 comments on commit e4ee2fa

Please sign in to comment.