Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 38 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ env:
GOPROXY: direct

jobs:
tests:
# Breaking tests into 2 phases, to prevent account lock out due to DOS protection
tests-1:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go
Expand All @@ -25,7 +26,41 @@ jobs:
go-version: 1.21.4

- name: Checkout Code
uses: actions/checkout@v3
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 ./...
Expand Down