-
Notifications
You must be signed in to change notification settings - Fork 135
52 lines (42 loc) · 1.08 KB
/
test.yaml
File metadata and controls
52 lines (42 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Go Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.25"
cache: true
- name: Download Go modules
run: go mod download
- name: Static Check
uses: dominikh/staticcheck-action@v1
with:
checks: '["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022", "-SA1019"]'
version: "latest"
install-go: false
- name: Test
shell: bash
run: |
set -euo pipefail
go test -race -json -v ./... 2>&1 | tee test.log
- name: Upload test log
uses: actions/upload-artifact@v4
if: always()
with:
name: test-log-${{ matrix.os }}
path: test.log
if-no-files-found: warn