mirror of
https://github.com/owncast/owncast.git
synced 2024-11-25 06:12:23 +03:00
439da013d8
* chore(go): update to go 1.22 * fix: install go before running codeql to fix autobild * chore(test): explicitly set base crosscompile image * fix(test): do not point at image with incorrect version of Go
68 lines
1.3 KiB
YAML
68 lines
1.3 KiB
YAML
name: Go Tests
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- 'web/**'
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'web/**'
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.21.x, 1.22.x]
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cache/go-build
|
|
~/go/pkg/mod
|
|
key: go-test-${{ github.sha }}
|
|
restore-keys: |
|
|
go-test-
|
|
|
|
- name: Install go
|
|
uses: actions/setup-go@v5
|
|
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@v4
|
|
with:
|
|
path: |
|
|
~/.cache/go-build
|
|
~/go/pkg/mod
|
|
key: go-test-${{ github.sha }}
|
|
restore-keys: |
|
|
go-test-
|
|
|
|
- name: Install go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '^1'
|
|
cache: true
|
|
|
|
- name: Run tests
|
|
run: go test ./...
|