-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (31 loc) · 1.09 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
# See https://github.com/pymor/pymor/blob/main/.github/workflows/linter.yml
name: Lint
on: [pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pylint poetry
poetry export -o requirements.txt
pip install -r requirements.txt
- name: Prepare artifacts directory
run: |
mkdir -p ./linter_output
echo ${{ github.event.number }} > ./linter_output/pr_number
echo ${{ github.event.pull_request.head.sha }} > ./linter_output/head_sha
- name: Lint with black
run: black . --check 2>&1 >/dev/null | tee ./linter_output/black.out
- name: Lint with flake8
run: flake8 | tee ./linter_output/flake8.out
- name: Lint with pylint
run: pylint ietf_reviewtool tests --output-format=json | tee ./linter_output/pylint.out
- uses: actions/upload-artifact@v4
with:
name: linter_output
path: linter_output