Skip to content

[ci] Use GH actions to expand OS test matrix #6

[ci] Use GH actions to expand OS test matrix

[ci] Use GH actions to expand OS test matrix #6

Workflow file for this run

name: go
on:
pull_request:
push:
branches:
- main
jobs:
test:
strategy:
matrix:
go:
- 1.20.4
os:
- macos-11
- macos-12
- macos-13
- windows-2019
- windows-2022
- ubuntu-20.04
cgo:
- 0
- 1
exclude:

Check failure on line 25 in .github/workflows/go.yml

View workflow run for this annotation

GitHub Actions / go

Invalid workflow file

The workflow is not valid. .github/workflows/go.yml (Line: 25, Col: 7): Unexpected value 'exclude'
# Ignore platforms that don't use CGO.
- {cgo: 1, os: windows-2019}
- {cgo: 1, os: windows-2022}
- {cgo: 1, os: ubuntu-20.04}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Set GO_VERSION
run: echo "GO_VERSION=${{ matrix.go }}" >> $GITHUB_ENV
- name: Test
if: runner.os != 'Windows'
run: .ci/scripts/test.sh
- name: Test
if: runner.os == 'Windows'
run: .ci/scripts/test.bat