Files
HackBrowserData/.github/workflows/test.yml
T
Roger 6d6191b4c6 ci: pin golangci-lint 2.14, add -race, fix golden updates (#674)
Local v2.14 and CI v2.10 disagreed on gofumpt; extra.group-params keeps v2.10's rules exactly.
go test ./... -update failed in the 12 packages that never import golden, so it is HBD_UPDATE_GOLDEN=1 now.
2026-11-01 23:39:04 +08:00

44 lines
931 B
YAML

name: Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
test:
name: Test (${{ matrix.os }})
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: '1.20.x'
- name: Run tests
if: matrix.os == 'windows-latest'
run: go test -v ./...
- name: Run tests with race detector and coverage
if: matrix.os != 'windows-latest'
run: go test -v -race -coverprofile=coverage.out ./...
- name: Upload coverage
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v7
with:
use_oidc: true
files: ./coverage.out
fail_ci_if_error: false
flags: unittests