owncast/.github/workflows/go-tests.yaml

69 lines
1.3 KiB
YAML
Raw Normal View History

name: Go Tests
on:
push:
paths-ignore:
- 'web/**'
pull_request:
paths-ignore:
- 'web/**'
jobs:
test:
2021-08-28 01:24:21 +03:00
strategy:
matrix:
2023-03-24 22:50:52 +03:00
go-version: [1.19.x, 1.20.x]
os: [ubuntu-latest, macos-latest, windows-latest]
2021-08-28 01:24:21 +03:00
runs-on: ${{ matrix.os }}
steps:
2022-04-10 14:54:39 +03:00
- uses: actions/checkout@v3
- 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'
2023-02-16 02:01:14 +03:00
cache: true
- name: Run tests
run: go test ./...
test-bsds:
2022-07-28 00:17:35 +03:00
runs-on: macos-latest
strategy:
matrix:
os:
- name: freebsd
version: 12.2
- name: openbsd
version: 6.8
steps:
2022-04-10 14:54:39 +03:00
- uses: actions/checkout@v3
- 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'
2023-02-16 02:01:14 +03:00
cache: true
- name: Run tests
run: go test ./...