Build and test internally #1455
This file contains 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 internally | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
jobs: | |
build_and_test_internally: | |
runs-on: ubuntu-latest | |
env: | |
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
name: Build and test internally (ubuntu-latest, Bazel last_green module, JDK 21) | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 21 | |
- name: Mount Bazel disk cache | |
uses: actions/cache@v4 | |
with: | |
path: "/home/runner/.cache/bazel-disk" | |
key: bazel-disk-cache-internal | |
- name: Build main repository | |
env: | |
USE_BAZEL_VERSION: "last_green" | |
run: bazelisk build --disk_cache="/home/runner/.cache/bazel-disk" //... | |
- name: Run tests in main repository | |
env: | |
USE_BAZEL_VERSION: "last_green" | |
run: bazelisk test --disk_cache="/home/runner/.cache/bazel-disk" //... |