forked from gotd/botapi
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 997 Bytes
/
Copy pathlint.yml
File metadata and controls
47 lines (40 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Lint
on:
push:
tags:
- v*
branches:
- main
pull_request:
workflow_dispatch:
jobs:
golangci-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Lint
# v8+ installs golangci-lint v2, which the .golangci.yml (version "2")
# requires; the v6 line defaults to v1 and rejects the config.
uses: golangci/golangci-lint-action@v9
with:
version: v2.12.2
args: --timeout 5m
# Check that go.mod/go.sum are tidy.
check-mod:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Tidy
run: go mod tidy
- name: Check git diff
run: git diff --exit-code