Skip to content

Update golangci/golangci-lint-action action to v5 #74

Update golangci/golangci-lint-action action to v5

Update golangci/golangci-lint-action action to v5 #74

Workflow file for this run

---
name: Go Test
on:
pull_request:
types:
- opened
- synchronize
- reopened
branches:
- main
env:
GO111MODULE: "on"
permissions:
contents: read
jobs:
golangci-lint:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch PRs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "^1.20"
check-latest: true
- uses: golangci/golangci-lint-action@v5.0.0
with:
version: latest
args: --verbose
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# get the whole repo, not just the last commit, so
# we can compare changes on this branch to main
fetch-depth: 0
- uses: actions/setup-python@v4
- uses: pre-commit/action@v3.0.0
with:
extra_args: --from-ref origin/main --to-ref HEAD
build:
name: build & test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "^1.20"
- name: Go Build
run: make build
- name: Go Test
run: make test