Skip to content

t

t #219

Workflow file for this run

name: 'test'
on: ['push', 'pull_request']
jobs:
# Uncomment to get a debug shell.
# debug: {runs-on: 'ubuntu-latest', steps: [{uses: 'actions/checkout@v4'}, {uses: 'mxschmitt/action-tmate@v3'}]}
test:
name: 'test (linux)'
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v4'
- name: 'test (linux)'
run: |
set -eux
# Quick exit on compile errors.
go build -race ./cmd/goatcounter || exit 1
# Make sure it at least compiles on macOS, Windows, and arm64
GOARCH=arm64 go build ./cmd/goatcounter
GOARCH=arm64 GOOS=darwin go build ./cmd/goatcounter
GOOS=windows go build ./cmd/goatcounter
# Test SQLite
go test -race -timeout=3m ./...
# Test PostgreSQL
docker compose up -d --wait
CGO_ENABLED=0 go test -race -timeout=3m -tags=pgsql ./...
go test ./handlers -run TestSettingsMerge/merge_one_path -tags=testpg -v
staticcheck:
name: 'staticcheck'
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v4'
- uses: 'dominikh/[email protected]'
with: {version: '2025.1.1'}