| 1 |
name: Go |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
pull_request: |
| 6 |
schedule: |
| 7 |
- cron: '6 15 * * SUN' |
| 8 |
|
| 9 |
permissions: {} |
| 10 |
|
| 11 |
jobs: |
| 12 |
|
| 13 |
build: |
| 14 |
strategy: |
| 15 |
matrix: |
| 16 |
go-version: [1.24.x, 1.25.x] |
| 17 |
# We don't test on macOS and windows as the database builds aren't |
| 18 |
# repeatable there for some reason. As such, tests fail. It'd |
| 19 |
# probably be worth looking into this at some point. |
| 20 |
platform: [ubuntu-latest] |
| 21 |
runs-on: ${{ matrix.platform }} |
| 22 |
name: "Build ${{ matrix.go-version }} test on ${{ matrix.platform }}" |
| 23 |
steps: |
| 24 |
- name: Set up Go 1.x |
| 25 |
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 |
| 26 |
with: |
| 27 |
go-version: ${{ matrix.go-version }} |
| 28 |
id: go |
| 29 |
|
| 30 |
- name: Check out code into the Go module directory |
| 31 |
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 32 |
with: |
| 33 |
persist-credentials: false |
| 34 |
|
| 35 |
- name: Get dependencies |
| 36 |
run: go get -v -t -d ./... |
| 37 |
|
| 38 |
- name: Build |
| 39 |
run: go build -v ./... |
| 40 |
|
| 41 |
- name: Test |
| 42 |
run: go test -race -v ./... |