Skip to content

Commit 5f3a86a

Browse files
committed
feat: add basic github testing workflow
1 parent a3d4ce7 commit 5f3a86a

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
on: push
3+
4+
jobs:
5+
ci:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
- name: Install Python
10+
uses: actions/setup-python@v4
11+
12+
- name: Install poetry
13+
uses: abatilo/actions-poetry@v4
14+
- name: Setup a local virtual environment (if no poetry.toml file)
15+
run: |
16+
poetry config virtualenvs.create true --local
17+
poetry config virtualenvs.in-project true --local
18+
- uses: actions/cache@v3
19+
name: Define a cache for the virtual environment based on the dependencies lock file
20+
with:
21+
path: ./.venv
22+
key: venv-${{ hashFiles('poetry.lock') }}
23+
- name: Install the project dependencies
24+
run: poetry install
25+
- name: Run the automated tests (for example)
26+
run: poetry run pytest -v

0 commit comments

Comments
 (0)