-
Notifications
You must be signed in to change notification settings - Fork 43
105 lines (86 loc) · 2.66 KB
/
lint.yml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: "Lint"
on:
workflow_call:
defaults:
run:
shell: bash
jobs:
sh-euox-pipefail-check:
name: "Shell pipefail check"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Run 'set -euox pipefail' check
run: bash ./.github/scripts/ensure_set_euox_pipefail.sh
md-link-check:
name: "Broken Markdown links"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Run Markdown link check
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: '.github/linters/mlc_config.json'
use-quiet-mode: 'yes'
go-lint:
# We can't use VALIDATE_GO from super linter because of this issue:
# https://github.com/github/super-linter/issues/143
name: "Golang"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
cache: false # temporarily off, as golangci-lint doesn't align 100% with cached setup-go@v4, see: https://github.com/golangci/golangci-lint-action/issues/807
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.56.2
args: --config .github/linters/.golangci.yaml
proto-lint:
name: "Protobuf"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
# Install the `buf` CLI
- uses: bufbuild/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Lint
- uses: bufbuild/buf-lint-action@v1
with:
input: proto
# Breaking change detection
- uses: bufbuild/buf-breaking-action@v1
continue-on-error: true
with:
input: proto
against: 'https://github.com/cheqd/cheqd-node.git#branch=main,ref=HEAD~1,subdir=proto'
super-lint:
name: "Super Linter"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to fetch version
- name: Run Super Linter
uses: github/super-linter/slim@v7
env:
IGNORE_GITIGNORED_FILES: true
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LOG_LEVEL: WARN
VALIDATE_ALL_CODEBASE: false
MULTI_STATUS: true
PYTHON_PYLINT_CONFIG_FILE: .pylintrc
VALIDATE_BASH: true
VALIDATE_DOCKERFILE_HADOLINT: true
VALIDATE_ENV: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_JSON: true
VALIDATE_MARKDOWN: true
# VALIDATE_OPENAPI: true
VALIDATE_PYTHON_PYLINT: true
VALIDATE_XML: true
VALIDATE_YAML: true