Skip to content

Enable macOS unit tests for macOS 15 #40

Enable macOS unit tests for macOS 15

Enable macOS unit tests for macOS 15 #40

name: macos-unit-tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- '8.19'
- 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:
name: Unit tests ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-14
flags: ''
- os: macos-15
flags: 'RACE_DETECTOR=true TEST_COVERAGE=true '
event: [ 'pull_request', 'push', 'workflow_dispatch' ]
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"
- name: Install mage
run: make mage
- name: Beat version
run: |
BEAT_VERSION=$(grep -oE '[0-9]+\.[0-9]+\.[0-9]+(\-[a-zA-Z]+[0-9]+)?' "${WORKSPACE}/version/version.go")
echo "BEAT_VERSION=$beatVersion" >> $GITHUB_ENV
- run: |
RACE_DETECTOR=true TEST_COVERAGE=true mage unitTest