github.com/bufbuild/connect-grpchealth-go@v1.1.1/.github/workflows/ci.yaml (about)

     1  name: ci
     2  on:
     3    push:
     4      branches: [main]
     5      tags: ['v*']
     6    pull_request:
     7      branches: [main]
     8    schedule:
     9      - cron: '15 22 * * *'
    10    workflow_dispatch: {} # support manual runs
    11  permissions:
    12    contents: read
    13  jobs:
    14    ci:
    15      runs-on: ubuntu-latest
    16      strategy:
    17        matrix:
    18          go-version: [1.19.x, 1.20.x]
    19      steps:
    20        - name: Checkout Code
    21          uses: actions/checkout@v3
    22          with:
    23            fetch-depth: 1
    24        - name: Install Go
    25          uses: actions/setup-go@v4
    26          with:
    27            go-version: ${{ matrix.go-version }}
    28        - name: Cache
    29          uses: actions/cache@v3
    30          with:
    31            path: ~/go/pkg/mod
    32            key: ${{ runner.os }}-connect-grpchealth-go-ci-${{ hashFiles('**/go.sum') }}
    33            restore-keys: ${{ runner.os }}-connect-grpchealth-go-ci-
    34        - name: Test
    35          run: make test
    36        - name: Lint
    37          # Often, lint & gofmt guidelines depend on the Go version. To prevent
    38          # conflicting guidance, run only on the most recent supported version.
    39          if: matrix.go-version == '1.20.x'
    40          run: make checkgenerate && make lint