Skip to content

Commit

Permalink
Add CI work flow for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Actionb committed Aug 23, 2024
1 parent 7f24d1f commit 812edea
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test
on: push
#on:
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]

jobs:
tests:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: |
python -m pip install poetry==1.8.3
- name: Configure poetry
run: |
python -m poetry config virtualenvs.in-project true
- name: Cache the virtualenv
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: |
python -m poetry install
- name: Run tests
run: |
python -m poetry run python -m pytest -sxv

0 comments on commit 812edea

Please sign in to comment.