-
-
Notifications
You must be signed in to change notification settings - Fork 1
139 lines (117 loc) · 3.3 KB
/
lint.yaml
File metadata and controls
139 lines (117 loc) · 3.3 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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: "Lint"
on:
workflow_dispatch:
push:
branches: [master]
paths-ignore:
- ".gitattributes"
- ".gitignore"
- ".prettierignore"
- "MANIFEST.in"
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
steps:
- name: "Checkout"
uses: actions/checkout@v6
- name: "Debug event.json"
continue-on-error: true
run: cat "${GITHUB_EVENT_PATH}"
- name: "Debug CTX github"
continue-on-error: true
env:
GITHUB_CTX: ${{ toJSON(github) }}
run: echo "$GITHUB_CTX"
- name: "Debug Environment"
continue-on-error: true
run: env
- name: "Setup Python 3.13"
uses: actions/setup-python@v6
with:
python-version: "3.13"
cache: "pip"
- name: "Install Project"
run: |
python -m pip install -U pip
python -m pip install --group dev
python -m pip install -e .
python -m pip list
- name: "Debug"
continue-on-error: true
run: |
python -V
which python
echo "::group::pip list"
python -m pip list
echo "::endgroup::"
- name: "astral-sh/ruff"
if: ${{ !cancelled() }}
uses: astral-sh/ruff-action@4919ec5cf1f49eff0871dbcea0da843445b837e6 # v3.6.1
with:
version: latest
- name: "astral-sh/ty"
if: ${{ !cancelled() }}
run: |
ty check --python "$(which python)" -v
- name: "psf/black"
if: ${{ !cancelled() }}
uses: psf/black@stable
- name: "isort"
if: ${{ !cancelled() }}
uses: isort/isort-action@24d8a7a51d33ca7f36c3f23598dafa33f7071326 # v1.1.1
- name: "mypy"
if: ${{ !cancelled() }}
run: |
mypy src
- name: "bandit"
if: ${{ !cancelled() }}
run: |
bandit -c pyproject.toml -r src
- name: "validate-pyproject"
if: ${{ !cancelled() }}
run: |
validate-pyproject pyproject.toml
- name: "tombi"
if: ${{ !cancelled() }}
run: |
tombi lint
- name: "yamllint"
if: ${{ !cancelled() }}
run: |
echo "::group::List Files"
yamllint -d .github/yamllint.yaml --list-files .
echo "::endgroup::"
yamllint -d .github/yamllint.yaml .
- name: "prettier"
if: ${{ !cancelled() }}
run: |
echo "::group::Install"
npm install prettier
echo "::endgroup::"
npx prettier --check .
- name: "actionlint"
if: ${{ !cancelled() }}
uses: cssnr/actionlint-action@v1
with:
shellcheck_opts: -e SC2012
- name: "pytest"
if: ${{ !cancelled() }}
id: coverage
run: |
coverage run -m pytest
coverage xml
coverage report -m
- name: "codecov"
if: ${{ !cancelled() && steps.coverage.outcome == 'success' }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}