Skip to content

Commit

Permalink
Update lint_and_test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mietzen committed Jul 22, 2023
1 parent 994c739 commit 6182a94
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
fail-fast: false

steps:
- uses: actions/checkout@v3
Expand All @@ -24,12 +25,13 @@ jobs:
python -m pip install --upgrade pip
pip install ruff pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
ruff --format=github --select=E9,F63,F7,F82 --target-version=py37 .
# default set of ruff rules with GitHub Annotations
ruff --format=github --target-version=py37 .
- name: Test with pytest
run: |
pytest ./porkbun_ddns/test
- name: Lint with ruff
env:
PY_VER: ${{ matrix.python-version }}
run: |
# stop the build if there are Python syntax errors or undefined names
PY_VER=$(echo py${PY_VER} | tr -d '.')
ruff --format=github --select=E9,F63,F7,F82 --ignore=E501 --target-version=${PY_VER} .

0 comments on commit 6182a94

Please sign in to comment.