Skip to content

Commit

Permalink
ci: try to use poetry and just in CI
Browse files Browse the repository at this point in the history
Issue #52
  • Loading branch information
iacopy committed Nov 2, 2023
1 parent cf40535 commit 6462af5
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,26 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install just
uses: extractions/setup-just@v1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black flake8 isort mypy pylint pytest
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
pipx install poetry
pipx upgrade poetry
just install
- name: Lint with flake8, mypy, pylint, isort and black
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# check also with pylint
pylint $(git ls-files '*.py') --ignore=conf.py
# mypy
mypy src
# isort
isort --check-only --recursive --quiet .
# black
black --check .
just lint
- name: Test with pytest
run: |
pytest --cov --cov-report=xml
just cov
- name: Test & publish code coverage
# https://github.com/marketplace/actions/code-climate-coverage-action
uses: paambaati/[email protected]
Expand Down

0 comments on commit 6462af5

Please sign in to comment.