-
Notifications
You must be signed in to change notification settings - Fork 2
95 lines (81 loc) · 2.5 KB
/
code-quality.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
name: "Code Quality"
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
permissions:
contents: read
packages: read
statuses: write
jobs:
check-code-quality:
name: Check Code Quality
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# Lint and Format everything but Python/JavaScript/TypeScript
- name: Lint Code Base
uses: super-linter/super-linter/[email protected]
env:
VALIDATE_ALL_CODEBASE: true
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
LINTER_RULES_PATH: .github/super-linter-configurations
YAML_ERROR_ON_WARNING: true
VALIDATE_PYTHON_BLACK: false
VALIDATE_PYTHON_FLAKE8: false
VALIDATE_PYTHON_ISORT: false
VALIDATE_PYTHON_MYPY: false
VALIDATE_PYTHON_PYLINT: false
VALIDATE_PYTHON_RUFF: false
VALIDATE_PYTHON_PYINK: false
VALIDATE_NATURAL_LANGUAGE: false
GITHUB_ACTIONS_COMMAND_ARGS: "-ignore '.branding.icon.'"
check-python-code-format-and-quality:
name: Check Python Code Format and Quality
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Dependencies
uses: ./.github/actions/setup-dependencies
- name: Check Python Code Quality (Ruff)
run: just ruff-lint
- name: Check Python Code Format (Ruff)
run: just ruff-format
- name: Check Python Code for Dead Code (Vulture)
run: just vulture
check-markdown-links:
name: Check Markdown links
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check Markdown links
uses: UmbrellaDocs/[email protected]
with:
github_token: ${{ secrets.GH_TOKEN }}
config_file: .github/other-configurations/.linkspector.yml
reporter: github-pr-review
fail_on_error: true
filter_mode: nofilter
check-justfile-format:
name: Check Justfile Format
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Just
uses: extractions/setup-just@v2
- name: Check Justfile Format
run: just format-check