reworked conditioning module #50
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 Tests | |
on: | |
push: | |
branches: [ '*' ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, 3.11] | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
# Cache Python dependencies to avoid reinstalling them in each build | |
- name: Cache pip dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
# Set up the Python environment | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox tox-gh-actions | |
# Run tests with tox | |
- name: Test with tox | |
run: tox | |
# Upload coverage to Codecov | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml |