Add to tests CI action local package #114
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: Package tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
run_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11.0" | |
- uses: actions/cache@v3 | |
with: | |
path: venv | |
key: ${{ runner.os }}-${{ hashFiles('requirements-tests.txt') }} | |
- name: Run the tests | |
run: | | |
python -m venv create venv | |
source venv/bin/activate | |
python -m pip install . -r requirements-tests.txt | |
python -m pytest |