| 1 |
name: Go Matrix |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- main |
| 7 |
- master |
| 8 |
pull_request: |
| 9 |
branches: |
| 10 |
- main |
| 11 |
- master |
| 12 |
|
| 13 |
jobs: |
| 14 |
|
| 15 |
cross: |
| 16 |
name: Go |
| 17 |
runs-on: ${{ matrix.os }} |
| 18 |
env: |
| 19 |
CGO_ENABLED: 0 |
| 20 |
|
| 21 |
strategy: |
| 22 |
matrix: |
| 23 |
go-version: [ stable, oldstable ] |
| 24 |
os: [ubuntu-latest, macos-latest, windows-latest] |
| 25 |
|
| 26 |
steps: |
| 27 |
- uses: actions/checkout@v4 |
| 28 |
- uses: actions/setup-go@v5 |
| 29 |
with: |
| 30 |
go-version: ${{ matrix.go-version }} |
| 31 |
|
| 32 |
- name: Test |
| 33 |
run: go test -v -cover ./... |
| 34 |
|
| 35 |
- name: Build |
| 36 |
run: go build -v -ldflags "-s -w" -trimpath |