github.com/codykaup/genqlient@v0.6.2/.github/workflows/go.yml (about)

     1  name: Go
     2  
     3  on:
     4    push:
     5      branches: [ "*" ]
     6    pull_request:
     7      branches: [ main ]
     8  
     9  jobs:
    10    build:
    11      name: Test
    12      runs-on: ubuntu-latest
    13      strategy:
    14        matrix:
    15          go: [ '1.18', '1.19', '1.20' ]
    16  
    17      steps:
    18      - name: Set up Go
    19        uses: actions/setup-go@v1
    20        with:
    21          go-version: ${{ matrix.go }}
    22        id: go
    23  
    24      - name: Git checkout
    25        uses: actions/checkout@v2
    26  
    27      - name: Run tests
    28        env:
    29          # Needed for the example-test to run.
    30          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    31        run: |
    32          go test -cover -v ./...
    33  
    34    lint:
    35      name: Lint
    36      runs-on: ubuntu-latest
    37  
    38      steps:
    39      - name: Git checkout
    40        uses: actions/checkout@v2
    41  
    42      - name: Run lint
    43        uses: golangci/golangci-lint-action@v2
    44        with:
    45          version: v1.52.2   # should match internal/lint/go.mod