Enable macOS unit tests for macOS 15 #33
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: macos-unit-tests | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - 8.* | |
| - 9.* | |
| permissions: | |
| contents: read | |
| ## Concurrency only allowed in the main branch. | |
| ## So old builds running for old commits within the same Pull Request are cancelled | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| unit-tests-push: | |
| name: Unit tests ${{ matrix.os }} | |
| # if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ macos-14 ] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: .go-version | |
| - name: Install make | |
| run: | | |
| brew install make | |
| export PATH="/usr/local/opt/make/libexec/gnubin:$PATH" | |
| shell: bash | |
| - name: Install mage | |
| run: make mage | |
| shell: bash | |
| - name: Beat version | |
| run: | | |
| beatVersion=$(make get-version) | |
| echo "BEAT_VERSION=$beatVersion" >> $GITHUB_ENV | |
| shell: bash | |
| - run: | | |
| # On macOS 14 RACE_DETECTOR=true fails with `clang` since the binary exceeds architectural limits | |
| export CGO_ENABLED=1 | |
| export CC=clang | |
| export CXX=clang++ | |
| go clean -cache -testcache -modcache | |
| TEST_COVERAGE=true mage unitTest | |
| shell: bash | |
| unit-tests-pr: | |
| name: Unit tests ${{ matrix.os }} | |
| # if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ macos-15 ] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: .go-version | |
| - name: Install make | |
| run: | | |
| brew install make | |
| export PATH="/usr/local/opt/make/libexec/gnubin:$PATH" | |
| shell: bash | |
| - name: Install mage | |
| run: make mage | |
| shell: bash | |
| - name: Beat version | |
| run: | | |
| beatVersion=$(make get-version) | |
| echo "BEAT_VERSION=$beatVersion" >> $GITHUB_ENV | |
| shell: bash | |
| - run: | | |
| RACE_DETECTOR=true TEST_COVERAGE=true mage unitTest | |
| shell: bash |