Handle ranges per guidelines #14
Workflow file for this run
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: Run Unit Tests via Pytest | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.11 | |
uses: actions/[email protected] | |
with: | |
python-version: 3.11 | |
- id: cache-dependencies | |
name: Cache dependencies | |
uses: actions/[email protected] | |
with: | |
path: ${{ github.workspace }}/.venv | |
key: dependencies-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: dependencies- | |
- name: Install dependencies | |
if: steps.cache-dependencies.cache-hit != 'true' | |
run: | | |
python3 -m pip install -U pip poetry | |
poetry --version | |
poetry check --no-interaction | |
poetry config virtualenvs.in-project true | |
poetry install --no-interaction | |
- name: Run tests | |
run: | | |
poetry run pytest -ra -s Database/tests |