forked from charmbracelet/vhs
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (30 loc) · 788 Bytes
/
lint.yml
File metadata and controls
37 lines (30 loc) · 788 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
name: lint
on: [push, pull_request]
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Cache Go modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-lint-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-lint-
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.3.0
args: --timeout=5m
- name: Check go mod tidy
run: |
go mod tidy
git diff --exit-code go.mod go.sum