Skip to content

Commit

Permalink
Switch to poetry based build action
Browse files Browse the repository at this point in the history
  • Loading branch information
jlantz committed Oct 29, 2024
1 parent 0cb549b commit dd12faa
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
name: Run Tests

on:
push:
branches:
- "**"

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -18,22 +15,27 @@ jobs:
with:
python-version: "3.10"

- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
virtualenvs-in-project: true

- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
.venv
~/.cache/pypoetry
~/.cache/pip
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install dependencies
run: |
python -m pip install pip-tools
pip-compile --extra dev pyproject.toml -o requirements-dev.txt
pip install -r requirements-dev.txt
poetry install --with dev
- name: Run tests
run: |
pytest tests/
poetry run pytest tests/

0 comments on commit dd12faa

Please sign in to comment.