Skip to content

refactor

refactor #32

Workflow file for this run

name: Go
on:
push:
branches: [ master ]
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/go.yml'
pull_request:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/go.yml'
env:
GOPROXY: "https://proxy.golang.org"
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.54
args: --timeout=10m
- name: Check Go module tidiness
shell: bash
run: |
go mod tidy
STATUS=$(git status --porcelain)
if [ ! -z "$STATUS" ]; then
echo "Unstaged files:"
echo $STATUS
echo "Run 'go mod tidy' commit them"
exit 1
fi