Repository navigation
77 lines (71 loc) · 1.72 KB
/
Copy pathvalidate.yml
File metadata and controls
77 lines (71 loc) · 1.72 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: validate
on:
push:
tags:
- v*
branches:
- main
- release-*
pull_request:
schedule:
# Runs at 00:00 UTC every Monday
- cron: '0 0 * * 1'
permissions:
contents: read
jobs:
lint:
timeout-minutes: 30
permissions:
contents: read
pull-requests: read
checks: write # to allow the action to annotate code in the PR.
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 2
- uses: actions/setup-go@v7
with:
go-version: stable
- uses: golangci/golangci-lint-action@v9
# Extra linters, only checking new code from a pull request.
- name: lint-extra
if: github.event_name == 'pull_request'
run: |
golangci-lint run --config .golangci-extra.yml --new-from-rev=HEAD~1
codespell:
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
- name: install deps
# Use a known version of codespell.
run: pip install --break-system-packages codespell==v2.4.3
- name: run codespell
run: codespell
space-at-eol:
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
- run: if git -P grep -I -n '\s$'; then echo "^^^ extra whitespace at EOL, please fix"; exit 1; fi
deps:
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: stable
- run: go mod tidy --diff
govulncheck:
runs-on: ubuntu-26.04
steps:
- uses: golang/govulncheck-action@v1
all-done:
needs:
- codespell
- deps
- govulncheck
- lint
- space-at-eol
runs-on: ubuntu-26.04
steps:
- run: echo "All jobs completed"