forked from dmvassallo/EmbeddingScratchwork
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (59 loc) · 1.73 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
name: Lint Python code
on: [push, pull_request]
jobs:
flake8:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: flake8 Lint
uses: py-actions/flake8@v2
pylint:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
defaults:
run:
shell: bash -l {0}
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Install pylint-sarif-unofficial
run: pipx install pylint-sarif-unofficial
- name: Set up micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
- name: Make editable install
run: pip install -e .
- name: Run pylint, output annotations
run: |
(shopt -s globstar; pylint -f actions -- **/*.py || pylint-exit "$?")
- name: Run pylint, output SARIF
run: (shopt -s globstar; pylint2sarif -- **/*.py)
- name: Upload SARIF to GitHub Security Center
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: pylint.sarif
isort:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Set up micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
- name: Make editable install
run: pip install -e .
- name: isort Check
uses: isort/isort-action@v1