Skip to content

chore(deps): bump actions/create-github-app-token from 2 to 3 (#193) #1098

chore(deps): bump actions/create-github-app-token from 2 to 3 (#193)

chore(deps): bump actions/create-github-app-token from 2 to 3 (#193) #1098

Workflow file for this run

---
name: Run tests
on:
push:
branches:
- main
pull_request:
schedule:
- cron: "30 8 * * *" # runs every day at 8:30 am
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-test:
strategy:
fail-fast: ${{ github.event_name != 'schedule' }}
matrix:
bazel-version:
- 7.x
- 8.x
- 9.x
runner:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
- name: Set up
uses: ./.github/actions/setup
with:
bazel-version: ${{ matrix.bazel-version }}
- name: Run unit tests
shell: bash
run: ./development/cli/execute_unit_tests.bash
fetch-integration-test-directories:
runs-on: ubuntu-latest
outputs:
integ_test_dirs: ${{ steps.set-array.outputs.integ_test_dirs }}
steps:
- uses: actions/checkout@v6
- id: set-array
shell: bash
run: |
integ_test_dirs=$(find tests/integration -mindepth 1 -maxdepth 1 -type d | jq -R -s -c 'split("\n")[:-1]')
echo "integ_test_dirs=${integ_test_dirs}" >> "${GITHUB_OUTPUT}"
integration-test:
needs: fetch-integration-test-directories
strategy:
fail-fast: ${{ github.event_name != 'schedule' }}
matrix:
bazel-version:
- 7.x
- 8.x
- 9.x
runner:
- ubuntu-latest
- macos-latest
- windows-latest
integ_test_dir: ${{ fromJSON(needs.fetch-integration-test-directories.outputs.integ_test_dirs) }}
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
- name: Set up
uses: ./.github/actions/setup
with:
bazel-version: ${{ matrix.bazel-version }}
use-local-config-cc: ${{ contains(matrix.integ_test_dir, 'local_config_cc') }}
- name: Run integration tests
shell: bash
run: ./development/cli/execute_integration_tests.bash "${INTEG_TEST_DIR}"
env:
INTEG_TEST_DIR: ${{ matrix.integ_test_dir }}
example:
strategy:
fail-fast: ${{ github.event_name != 'schedule' }}
matrix:
bazel-version:
- 7.x
- 8.x
- 9.x
runner:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
- name: Set up
uses: ./.github/actions/setup
with:
bazel-version: ${{ matrix.bazel-version }}
- name: Validate example
shell: bash
run: ./development/cli/validate_example.bash
style-check:
runs-on: ubuntu-latest
env:
bazel-version: 9.x
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
- name: Set up
uses: ./.github/actions/setup
with:
bazel-version: ${{ env.bazel-version }}
- name: Run formatters and linters
shell: bash
run: ./development/cli/style_check.bash
- name: Fail if some files are changed
shell: bash
run: |
if ! git diff --exit-code; then
echo "ERROR: Files are changed by formatters" >&2
exit 1
fi
all-tests-passable:
if: always()
needs:
- unit-test
- integration-test
- example
- style-check
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}