Skip to content

Add testing with GitHub Actions (#8) #5

Add testing with GitHub Actions (#8)

Add testing with GitHub Actions (#8) #5

Workflow file for this run

name: Run tests and upload coverage
on:
push:
branches:
- main
pull_request:
jobs:
run:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements-test.txt
- name: Install dependencies
run: pip install -r requirements-test.txt
- name: Run tests and collect coverage
run: pytest --cov midi_app_controller
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: matrix.python-version == '3.12'
with:
fail_ci_if_error: true