Mnaranjo/bazel 8 #247
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 - allowed to fail" | |
| on: | |
| pull_request_target: | |
| 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: | |
| e2e-bzlmod-toolchain-circular-dependencies: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| 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: | | |
| import %workspace%/../../.aspect/bazelrc/ci.bazelrc | |
| import %workspace%/../../.github/workflows/ci.bazelrc | |
| - id: prepare | |
| run: | | |
| export USE_BAZEL_VERSION=8.x | |
| cd e2e/bzlmod-toolchain-circular-dependencies | |
| bazelisk run @bazeldnf_rpms//:fetch-repo | |
| bazelisk run @bazeldnf_rpms//:update-lock-file | |
| - id: test | |
| run: | | |
| export USE_BAZEL_VERSION=8.x | |
| cd e2e/bzlmod-toolchain-circular-dependencies | |
| bazelisk build //... || status=$? | |
| if [ ${status} -ne 0 ]; then | |
| echo "::warning::Optional job failed." | |
| echo "optional_fail=true" >> "${GITHUB_OUTPUT}" | |
| echo "optional_fail_status=${status}" >> "${GITHUB_OUTPUT}" | |
| fi; | |
| - name: Add comment if optional job failed; delete otherwise | |
| uses: thollander/actions-comment-pull-request@v3 | |
| with: | |
| comment-tag: "circular-dependencies-optional-notice" | |
| message: | | |
| ### ⚠️ Optional job e2e-bzlmod-toolchain-circular-dependencies failed ⚠️ | |
| - exit status: ${{ steps.test.outputs.optional_fail_status }} | |
| mode: ${{ steps.test.outputs.optional_fail == 'true' && 'upsert' || 'delete' }} |