Adding release.yml gh action #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit tests | |
on: [push, pull_request] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install python | |
uses: actions/setup-python@v4 | |
# see details (matrix, python-version, python-version-file, etc.) | |
# https://github.com/actions/setup-python | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
- name: Prepare local environment | |
run: | | |
poetry config virtualenvs.create true --local | |
poetry config virtualenvs.in-project true --local | |
- uses: actions/cache@v3 | |
name: Define cache | |
with: | |
path: ./.venv | |
key: venv-${{ hashFiles('poetry.lock') }} | |
- name: Install dependencies | |
run: poetry install | |
- name: Run pytest | |
run: poetry run pytest -v |