github.com/go-playground/pkg/v5@v5.29.1/.github/workflows/go.yml (about)

     1  name: Lint & Test
     2  on:
     3    push:
     4      branches:
     5        - master
     6    pull_request:
     7      types: [opened, edited, reopened, synchronize]
     8  
     9  concurrency:
    10    group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
    11    cancel-in-progress: true
    12  
    13  jobs:
    14    test:
    15      strategy:
    16        matrix:
    17          go-version: [1.22.x,1.21.x,1.20.x,1.19.x,1.18.x,1.17.x]
    18          os: [ubuntu-latest, macos-latest, windows-latest]
    19      runs-on: ${{ matrix.os }}
    20      steps:
    21        - name: Checkout code
    22          uses: actions/checkout@v4
    23  
    24        - name: Install Go
    25          uses: actions/setup-go@v5
    26          with:
    27            go-version: ${{ matrix.go-version }}
    28  
    29        - name: Test
    30          run: go test -race -cover ./...
    31  
    32    golangci:
    33      name: lint
    34      runs-on: ubuntu-latest
    35      steps:
    36        - uses: actions/checkout@v4
    37        - uses: actions/setup-go@v5
    38          with:
    39            go-version: stable
    40        - name: golangci-lint
    41          uses: golangci/golangci-lint-action@v4
    42          with:
    43            version: latest