Skip to content

Commit

Permalink
Merge pull request #91 from chrisbrickhouse/workflow-update
Browse files Browse the repository at this point in the history
Workflows install and cache dependencies, use poetry
  • Loading branch information
JoFrhwld authored Oct 18, 2022
2 parents 4f53747 + f11ab42 commit 22bbcff
Show file tree
Hide file tree
Showing 3 changed files with 215 additions and 71 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/test-and-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,24 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install poetry
uses: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
poetry env use "${{ matrix.python-version }}"
poetry install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run 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
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python -m pytest tests/
poetry run pytest tests/
Loading

0 comments on commit 22bbcff

Please sign in to comment.