Test: Add macos-14 builder (Apple Silicon M1/ARM) #23
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: tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
VCC_USER: ${{ secrets.VCC_USER }} | |
VCC_PASS: ${{ secrets.VCC_PASS }} | |
GOPROXY: direct | |
jobs: | |
# Breaking tests into 2 phases, to prevent account lock out due to DOS protection | |
tests-1: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.21.4 | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Run Golang Tests | |
run: go test -v ./... | |
- name: Setup BATS | |
if: runner.os != 'windows' | |
run: | | |
set -e | |
if [ -n "$GITHUB_RUN_ID" ]; then | |
export GITHUB_API_TOKEN="${{ secrets.GITHUB_TOKEN }}" | |
fi | |
git clone https://github.com/bats-core/bats-core.git && bats-core/install.sh $HOME | |
- name: Run BATS Tests | |
if: runner.os != 'windows' | |
run: | | |
export PATH=${PATH}:/home/runner/bin | |
# Retry hack to attempt test 3 times | |
bats test/bats | |
tests-2: | |
strategy: | |
matrix: | |
os: [macos-14, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.21.4 | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Run Golang Tests | |
run: go test -v ./... | |
- name: Setup BATS | |
if: runner.os != 'windows' | |
run: | | |
set -e | |
if [ -n "$GITHUB_RUN_ID" ]; then | |
export GITHUB_API_TOKEN="${{ secrets.GITHUB_TOKEN }}" | |
fi | |
git clone https://github.com/bats-core/bats-core.git && bats-core/install.sh $HOME | |
- name: Run BATS Tests | |
if: runner.os != 'windows' | |
run: | | |
export PATH=${PATH}:/home/runner/bin | |
# Retry hack to attempt test 3 times | |
bats test/bats |