-
Notifications
You must be signed in to change notification settings - Fork 89
51 lines (49 loc) · 1.47 KB
/
fixcore_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
name: Lint (fixcore)
on:
push:
branches:
- main
paths:
- 'fixcore/**'
- '.github/**'
- 'requirements-all.txt'
pull_request:
paths:
- 'fixcore/**'
- '.github/**'
- 'requirements-all.txt'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
fixcore-lint:
name: "Lint (fixcore)"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
- name: Restore dependency cache
uses: actions/cache@v4
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{runner.os}}-pip-${{hashFiles('./fixcore/pyproject.toml')}}-${{hashFiles('./fixcore/requirements-all.txt')}}
- name: Install Dependencies
run: ./setup_venv.sh --dev --no-venv --no-plugins
- name: Check Formatting
working-directory: ./fixcore
run: black --line-length 120 --check fixcore tests
- name: Lint
working-directory: ./fixcore
run: |
flake8 fixcore
pylint fixcore
- name: MyPy
working-directory: ./fixcore
run: mypy --install-types --non-interactive --strict fixcore tests