2022-11-04 20:04:13 -07:00
|
|
|
name: Go Tests
|
2020-07-14 16:37:41 -07:00
|
|
|
|
2022-06-29 14:34:37 -07:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- 'web/**'
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'web/**'
|
|
|
|
|
2020-07-14 16:37:41 -07:00
|
|
|
jobs:
|
|
|
|
test:
|
2021-08-27 15:24:21 -07:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-04-22 13:23:52 -07:00
|
|
|
go-version: [1.21.x, 1.22.x]
|
2021-10-31 21:01:22 +00:00
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
2021-08-27 15:24:21 -07:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-07-14 16:37:41 -07:00
|
|
|
steps:
|
2023-10-07 13:52:25 -07:00
|
|
|
- uses: actions/checkout@v4
|
2020-07-14 16:37:41 -07:00
|
|
|
|
2024-03-03 18:45:28 -08:00
|
|
|
- uses: actions/cache@v4
|
2023-06-13 14:33:17 -07:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/go-build
|
|
|
|
~/go/pkg/mod
|
|
|
|
key: go-test-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
go-test-
|
|
|
|
|
2020-07-14 16:37:41 -07:00
|
|
|
- name: Install go
|
2023-12-19 17:51:40 -08:00
|
|
|
uses: actions/setup-go@v5
|
2020-07-14 16:37:41 -07:00
|
|
|
with:
|
2022-06-29 14:34:37 -07:00
|
|
|
go-version: '^1'
|
2023-02-15 15:01:14 -08:00
|
|
|
cache: true
|
2020-07-14 16:37:41 -07:00
|
|
|
|
|
|
|
- name: Run tests
|
2020-11-12 22:29:38 +01:00
|
|
|
run: go test ./...
|
2021-08-27 15:34:22 -07:00
|
|
|
|
|
|
|
test-bsds:
|
2022-07-27 14:17:35 -07:00
|
|
|
runs-on: macos-latest
|
2021-08-27 15:34:22 -07:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- name: freebsd
|
|
|
|
version: 12.2
|
|
|
|
- name: openbsd
|
|
|
|
version: 6.8
|
|
|
|
|
|
|
|
steps:
|
2023-10-07 13:52:25 -07:00
|
|
|
- uses: actions/checkout@v4
|
2021-08-27 15:34:22 -07:00
|
|
|
|
2024-03-03 18:45:28 -08:00
|
|
|
- uses: actions/cache@v4
|
2023-06-13 14:33:17 -07:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/go-build
|
|
|
|
~/go/pkg/mod
|
|
|
|
key: go-test-${{ github.sha }}
|
|
|
|
restore-keys: |
|
|
|
|
go-test-
|
|
|
|
|
2021-08-27 15:34:22 -07:00
|
|
|
- name: Install go
|
2023-12-19 17:51:40 -08:00
|
|
|
uses: actions/setup-go@v5
|
2021-08-27 15:34:22 -07:00
|
|
|
with:
|
2022-06-29 14:34:37 -07:00
|
|
|
go-version: '^1'
|
2023-02-15 15:01:14 -08:00
|
|
|
cache: true
|
2021-08-27 15:34:22 -07:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: go test ./...
|