Mnaranjo/revamp e2e #642
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "build and test" | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| concurrency: | |
| # Cancel previous actions from the same PR or branch except 'main' branch. | |
| # See https://docs.github.com/en/actions/using-jobs/using-concurrency and https://docs.github.com/en/actions/learn-github-actions/contexts for more info. | |
| group: concurrency-group::${{ github.workflow }}::${{ github.event.pull_request.number > 0 && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}${{ github.ref_name == 'main' && format('::{0}', github.run_id) || ''}} | |
| cancel-in-progress: ${{ github.ref_name != 'main' }} | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: bazel-contrib/[email protected] | |
| with: | |
| # Avoid downloading Bazel every time. | |
| bazelisk-cache: true | |
| # Keep a disk-cache | |
| disk-cache: true | |
| # Share repository cache between workflows. | |
| repository-cache: true | |
| # enable some flags for CI | |
| bazelrc: | | |
| try-import %workspace%/.aspect/bazelrc/ci.bazelrc | |
| try-import %workspace%/.github/workflows/ci.bazelrc | |
| try-import %workspace%/../../.aspect/bazelrc/ci.bazelrc | |
| try-import %workspace%/../../.github/workflows/ci.bazelrc | |
| # keep a cache for MODULE.bazel repos | |
| external-cache: true | |
| - id: build | |
| run: bazelisk build //... | |
| - id: unit-tests | |
| run: bazelisk test //... | |
| - id: e2e-that-should-pass | |
| run: bazelisk test e2e --notest_keep_going | |
| - id: e2e-that-are-allowed-to-fail | |
| continue-on-error: true | |
| run: bazel test //e2e:circular-deps --notest_keep_going |