| name: 'go test' | |
| on: ['push', 'pull_request'] | |
| jobs: | |
| staticcheck: | |
| name: 'staticcheck' | |
| runs-on: 'ubuntu-latest' | |
| steps: | |
| - uses: 'actions/checkout@v6' | |
| - uses: 'dominikh/staticcheck-action@v1' | |
| test: | |
| strategy: | |
| matrix: | |
| go-version: ['1.21.x', '1.26.x'] | |
| # macOS disabled for now because it fails with: | |
| # missing LC_UUID load command in /private/var/../toml.test | |
| # Looks like at least Go 1.24 is needed? https://stackoverflow.com/a/79790775 | |
| #os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | |
| os: ['ubuntu-latest', 'windows-latest'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: 'actions/checkout@v6' | |
| - uses: 'actions/setup-go@v6' | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - run: 'go test -race ./...' | |
| - name: 'Test on 32bit' | |
| if: "runner.os == 'Linux'" | |
| run: 'GOARCH=386 go test ./...' |