-
Notifications
You must be signed in to change notification settings - Fork 10
57 lines (48 loc) · 1.54 KB
/
Copy pathlint.yaml
File metadata and controls
57 lines (48 loc) · 1.54 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
name: Lint
on:
pull_request:
types: [opened, synchronize, reopened]
# To cancel a currently running workflow from the same PR, branch or tag when a new workflow is triggered
# https://stackoverflow.com/a/72408109
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install linters
run: pip install ruff pyright numpy
- name: Lint with ruff
id: ruff
run: ruff check eks tests
# Reads config from [tool.ruff] in pyproject.toml
- name: Show fix instructions if linting failed
if: always() && steps.ruff.outcome == 'failure'
run: |
echo ""
echo "Linting failed!"
echo ""
echo "To auto-fix issues locally, run:"
echo " ruff check --fix eks tests"
echo ""
echo "To see all violations without fixing, run:"
echo " ruff check eks tests"
echo ""
- name: Type check with pyright
id: pyright
run: pyright eks
- name: Show fix instructions if type checking failed
if: always() && steps.pyright.outcome == 'failure'
run: |
echo ""
echo "Type checking failed!"
echo ""
echo "To reproduce locally, run:"
echo " pyright eks"
echo ""