Merge pull request #10 from Ddedalus/release-0.2.1 #23
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: Test | |
on: | |
# run on open merge requests and on main branch | |
pull_request: | |
types: [opened, synchronize] | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
- name: Install poetry | |
run: | | |
pip install poetry | |
poetry config virtualenvs.in-project true | |
- name: Set up cache for dependencies | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Ensure cache is healthy | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv | |
- name: Install Dependencies | |
run: poetry install --with dev | |
- name: pytest | |
run: poetry run pytest |