-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (76 loc) · 1.89 KB
/
Copy pathpr-checks.yml
File metadata and controls
78 lines (76 loc) · 1.89 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
78
---
name: PR checks
on:
push:
branches: ["main"]
pull_request:
jobs:
# Check if there is any dirty change for go mod tidy
go-mod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v6
with:
go-version: stable
- name: Check go mod
run: |
go mod tidy
git diff --exit-code go.mod
lint:
name: lint
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [oldstable, stable]
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.5
spell:
name: "Spell check"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 1
- uses: codespell-project/actions-codespell@v2
with:
check_filenames: true
check_hidden: true
typos:
# https://github.com/crate-ci/typos
# Add exceptions to _typos.toml
# install and run locally: cargo install typos-cli && typos
name: typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v7
- name: Check spelling of entire workspace
uses: crate-ci/typos@v1
markdownlint:
name: markdownlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: DavidAnson/markdownlint-cli2-action@v23
with:
globs: '**/*.md'
yamllint:
name: 'yamllint'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: karancode/yamllint-github-action@master
with:
yamllint_comment: true
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}