You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.3 KiB
68 lines
1.3 KiB
name: Go Tests |
|
|
|
on: |
|
push: |
|
paths-ignore: |
|
- 'web/**' |
|
pull_request: |
|
paths-ignore: |
|
- 'web/**' |
|
|
|
jobs: |
|
test: |
|
strategy: |
|
matrix: |
|
go-version: [1.20.x, 1.21.x] |
|
os: [ubuntu-latest, macos-latest, windows-latest] |
|
runs-on: ${{ matrix.os }} |
|
steps: |
|
- uses: actions/checkout@v4 |
|
|
|
- uses: actions/cache@v3 |
|
with: |
|
path: | |
|
~/.cache/go-build |
|
~/go/pkg/mod |
|
key: go-test-${{ github.sha }} |
|
restore-keys: | |
|
go-test- |
|
|
|
- name: Install go |
|
uses: actions/setup-go@v4 |
|
with: |
|
go-version: '^1' |
|
cache: true |
|
|
|
- name: Run tests |
|
run: go test ./... |
|
|
|
test-bsds: |
|
runs-on: macos-latest |
|
strategy: |
|
matrix: |
|
os: |
|
- name: freebsd |
|
version: 12.2 |
|
- name: openbsd |
|
version: 6.8 |
|
|
|
steps: |
|
- uses: actions/checkout@v4 |
|
|
|
- uses: actions/cache@v3 |
|
with: |
|
path: | |
|
~/.cache/go-build |
|
~/go/pkg/mod |
|
key: go-test-${{ github.sha }} |
|
restore-keys: | |
|
go-test- |
|
|
|
- name: Install go |
|
uses: actions/setup-go@v4 |
|
with: |
|
go-version: '^1' |
|
cache: true |
|
|
|
- name: Run tests |
|
run: go test ./...
|
|
|