Skip to content

Commit

Permalink
Fix erroneous CI + enable caching
Browse files Browse the repository at this point in the history
  • Loading branch information
arnavb committed May 19, 2023
1 parent 4361e19 commit 89f14ad
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,40 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v3
- name: Check out repository
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies

- name: Install and Configure Poetry
run: |
python -m pip install --upgrade pip
python -m pip install --user pipx
python -m pipx install poetry==${{ matrix.poetry-version }}
python -m pipx ensurepath
poetry config virtualenvs.in-project true
- name: Set up cache
uses: actions/cache@v3
id: cache
with:
path: .venv
key:
venv-${{ runner.os }}-${{ steps.setup-python.outputs.version }}-${{
hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: |
poetry install
- name: Lint with ruff
run: |
ruff check . --format=github
poetry run ruff check . --format=github
- name: Test with pytest
run: |
pytest
poetry run pytest

0 comments on commit 89f14ad

Please sign in to comment.