Skip to content

feat: Mac OS support #74

feat: Mac OS support

feat: Mac OS support #74

Workflow file for this run

---
name: Run tests
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-test:
strategy:
matrix:
bazel-version:
- 6.5.0
- 7.1.1
runner:
- ubuntu-20.04
- ubuntu-22.04
- macos-13
- macos-14
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up
uses: ./.github/actions/setup
with:
bazel-version: ${{ matrix.bazel-version }}
- name: Run unit tests
run: ./scripts/execute_tests.bash
example:
strategy:
matrix:
bazel-version:
- 6.5.0
- 7.1.1
runner:
- ubuntu-20.04
- ubuntu-22.04
- macos-13
- macos-14
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up
uses: ./.github/actions/setup
with:
bazel-version: ${{ matrix.bazel-version }}
- name: Validate example
run: ./scripts/validate_example.bash
style-check:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Set up
uses: ./.github/actions/setup
- name: Run formatters and linters
run: ./scripts/style_check.bash
- name: Fail if some files are changed
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
- example
- style-check
runs-on: ubuntu-22.04
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}