• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1on: [push, pull_request]
2name: Test
3permissions:
4  contents: read
5jobs:
6  test:
7    strategy:
8      matrix:
9        go-version: [1.18.x, 1.19.x, 1.20.x, 1.21.x]
10        os: [ubuntu-latest, macos-latest]
11    runs-on: ${{ matrix.os }}
12    steps:
13    - name: Install Go
14      uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492 # v2.2.0
15      with:
16        go-version: ${{ matrix.go-version }}
17    - name: Checkout code
18      uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
19    - name: Test
20      run: go test -v -race ./...
21    - name: Format
22      if: matrix.go-version == '1.21.x'
23      run: diff -u <(echo -n) <(gofmt -d .)
24