Dev #335
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: Tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
installation: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
python: ["3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Test installation | |
run: | | |
pip install "git+https://github.com/lewiswolf/kac_drumset.git" | |
python3 -c "import kac_drumset" | |
all-tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
python: ["3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: lukka/get-cmake@latest | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- uses: actions/cache@v4 | |
id: cache-pipenv | |
with: | |
path: ~/.local/share/virtualenvs | |
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-pipenv-${{ hashFiles('Pipfile.lock') }} | |
- name: Install OS specific dependencies | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: sudo apt-get install libsndfile1 | |
- name: Install pipenv | |
run: python -m pip install --upgrade pip pipenv setuptools wheel | |
- name: Install python dependencies | |
run: pipenv install -d --python ${{ matrix.python }} | |
- name: Build CPP | |
run: pipenv run build | |
- name: Lint project 3.11 | |
if: ${{ matrix.python == '3.11' }} | |
run: pipenv run flake8 --config=test/test.cfg | |
- name: Lint project 3.12 | |
if: ${{ matrix.python == '3.12' }} | |
run: pipenv run flake8 --config=test/test.cfg --extend-ignore=Q000 | |
- name: Assert types | |
run: pipenv run mypy --config-file=test/test.cfg | |
- name: Run unit tests | |
run: pipenv run python test/test.py |