Skip to content
# Checks that we can build and validate the Unittest
name: Pull-Request-Checks
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.9
- name: Install Poetry Action
uses: snok/[email protected]
- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
with:
path: ~/.virtualenvs
key: poetry-$
restore-keys: |
poetry-$
- name: Install Dependencies using Poetry
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
- name: Run pytest
run: PYTHONPATH=src/ poetry run python -m pytest -v --cov=src/ tests/
- name: Run Coverage
run: PYTHONPATH=src/ poetry run python -m coverage report -m;
- name: Generate XML Report
run: PYTHONPATH=src/ poetry run python -m coverage xml