-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (41 loc) · 1.46 KB
/
lint_python.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
name: lint_python
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: pip install --user ruff
- run: ruff --format=github --target-version=py37 .
lint_python:
needs: ruff
runs-on: ubuntu-latest
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsenv
env:
TESTDEADLINK_KEY: ${{ secrets.TESTDEADLINK_KEY }}
ia_sandbox: ${{ secrets.ia_sandbox }}
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: 3.x
cache: 'poetry'
# - name: Redis Server in GitHub Actions
# uses: supercharge/[email protected]
- run: pip install --upgrade pip wheel
- run: poetry install --with=dev
- run: poetry run black --check .
- run: poetry run codespell src/ tests/ *.md *.py # --ignore-words-list="" --skip="*.css,*.js,*.lock"
- run: mkdir --parents --verbose .mypy_cache
- run: poetry run mypy --ignore-missing-imports --install-types --non-interactive --exclude test_data --exclude deprecated .
# remove safety check, as it was requiring a commercial license to succeed!
# - run: poetry run safety check
# Copy the config
- run: cp config_sample.py config.py
- run: poetry run pytest .