Skip to content

Run CI builds on all PRs #22

Run CI builds on all PRs

Run CI builds on all PRs #22

Workflow file for this run

name: Go
on:
push:
branches: [ main ]
pull_request:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Check out repository
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
cache: false
- uses: golangci/golangci-lint-action@v3
name: Install golangci-lint
with:
version: latest
args: --version
- run: make lint
name: Lint
test:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ "1.19.x", "1.20.x" ]
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
cache: true
- name: Load cached dependencies
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Download dependencies
run: go mod download
- name: Build
run: make build
- name: Test and generate coverage report
run: make cover