Skip to content

Commit 8212870

Browse files
committed
Swap for just windows linting
1 parent 24ef883 commit 8212870

2 files changed

Lines changed: 39 additions & 11 deletions

File tree

.github/workflows/lint.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
name: Python Lint Workflow
22
on:
3-
push:
4-
branches: [ "main" ]
5-
pull_request:
6-
# The branches below must be a subset of the branches above
7-
branches: [ "main" ]
8-
schedule:
9-
- cron: '22 3 * * 2'
103
workflow_dispatch:
114

125
jobs:
@@ -15,8 +8,8 @@ jobs:
158
strategy:
169
matrix:
1710
linter: ['flake8', 'pylint', 'ruff', 'mypy', 'pytype', 'pyright', 'fixit']
18-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
19-
os: [ubuntu-latest, windows-latest, macos-latest]
11+
python-version: ['3.10']
12+
os: [windows-latest]
2013
fail-fast: false
2114

2215
steps:
@@ -26,10 +19,10 @@ jobs:
2619
- name: Install pip dependencies
2720
run: |
2821
python3 -mpip install -q --upgrade pip
29-
python3 -mpip install -q flake8 pylint ruff mypy pytype pyright fixit
22+
python3 -mpip install -q flake8 pylint ruff mypy pytype pyright fixit pyre-check
3023
python3 -mpip install -q flake8-sarif-formatter
3124
- name: Run Python Lint
3225
uses: advanced-security/python-lint-code-scanning-action@main
3326
with:
3427
linter: ${{ matrix.linter }}
35-
python-version: ${{ matrix.python-version }}
28+
python-version: ${{ matrix.python-version }}

.github/workflows/lint_all.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Python Lint Workflow
2+
on:
3+
push:
4+
branches: [ "main" ]
5+
pull_request:
6+
# The branches below must be a subset of the branches above
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '22 3 * * 2'
10+
workflow_dispatch:
11+
12+
jobs:
13+
lint:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
linter: ['flake8', 'pylint', 'ruff', 'mypy', 'pytype', 'pyright', 'fixit']
18+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
19+
os: [ubuntu-latest, windows-latest, macos-latest]
20+
fail-fast: false
21+
22+
steps:
23+
# install dependencies for all linters, then run the linter, so we don't get import failures when the linters scan the code
24+
# upgrade pip, so that we can install flake8_sarif_formatter properly from the git repo
25+
- uses: actions/checkout@v4
26+
- name: Install pip dependencies
27+
run: |
28+
python3 -mpip install -q --upgrade pip
29+
python3 -mpip install -q flake8 pylint ruff mypy pytype pyright fixit
30+
python3 -mpip install -q flake8-sarif-formatter
31+
- name: Run Python Lint
32+
uses: advanced-security/python-lint-code-scanning-action@main
33+
with:
34+
linter: ${{ matrix.linter }}
35+
python-version: ${{ matrix.python-version }}

0 commit comments

Comments
 (0)