-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
41 lines (34 loc) · 997 Bytes
/
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
name: Lint
on:
pull_request: # Trigger on PRs to develop and v4
branches:
- develop
- v4
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Get out of detached head state
run: |
git fetch origin ${{ github.base_ref }}
git fetch origin ${{ github.ref }}
git checkout FETCH_HEAD --
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: pip install --upgrade ruff setuptools toml wheel yapf==0.32.0
- name: Test that yapf has been applied
# If this check fails for your PR, run `yapf -rip .`
run: yapf --recursive --parallel --diff .
- name: Run Lint
run: ruff --output-format=github .
- name: Test Packaging
run: |
python setup.py sdist bdist_wheel
pip install -v .