-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (65 loc) · 2.59 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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@main
with:
python-version: ${{ matrix.python }}
- name: Test installation
run: |
pip install "git+https://github.com/lewiswolf/kac_drumset.git"
python3 -c "import kac_drumset"
# - name: Test C++ deployment
# run: |
# python3 -c "import kac_drumset.externals._geometry"
# python3 -c "import kac_drumset.externals._physics"
all-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
# os: [macos-latest, ubuntu-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