github.com/sethvargo/go-limiter@v1.0.0/.github/workflows/test.yml (about) 1 name: 'Test' 2 3 on: 4 push: 5 branches: 6 - 'main' 7 tags: 8 - '*' 9 pull_request: 10 branches: 11 - 'main' 12 13 jobs: 14 # unit runs the unit tests 15 unit: 16 strategy: 17 fail-fast: false 18 matrix: 19 os: 20 - 'macos-latest' 21 - 'ubuntu-latest' 22 - 'windows-latest' 23 24 runs-on: '${{ matrix.os }}' 25 26 steps: 27 - uses: 'actions/checkout@v4' 28 29 - uses: 'actions/setup-go@v5' 30 with: 31 go-version-file: 'go.mod' 32 33 - name: Lint 34 if: ${{ matrix.os == 'ubuntu-latest' }} 35 run: |- 36 make fmtcheck staticcheck spellcheck 37 38 - name: Test 39 run: |- 40 make test-acc 41 42 # build runs go build on the target platforms to ensure the runtime links are 43 # correct. 44 build: 45 strategy: 46 fail-fast: false 47 matrix: 48 goos: 49 - 'darwin' 50 - 'freebsd' 51 - 'linux' 52 - 'netbsd' 53 - 'openbsd' 54 - 'solaris' 55 - 'windows' 56 goarch: 57 - 'amd64' 58 59 runs-on: 'ubuntu-latest' 60 61 steps: 62 - uses: 'actions/checkout@v4' 63 64 - uses: 'actions/setup-go@v5' 65 with: 66 go-version-file: 'go.mod' 67 68 - name: Build 69 env: 70 GOOS: ${{ matrix.goos }} 71 GOARCH: ${{ matrix.goarch }} 72 run: |- 73 go build -a ./...