-
Notifications
You must be signed in to change notification settings - Fork 1
107 lines (87 loc) · 2.81 KB
/
ci.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: CI
on:
push:
branches-ignore:
- 'dependabot/**'
- 'pre-commit-ci-update-config'
pull_request:
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
os: [ubuntu-latest, macos-latest, macos-13, windows-latest]
name: Test • Python ${{ matrix.python-version }} • ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package
run: |
python -m pip install --upgrade pip
pip install .[music_notation]
- name: Install PortAudio and LilyPond (Linux)
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt install libportaudio2 lilypond
- name: Install LilyPond (macOS)
if: contains(matrix.os, 'macos')
run: |
brew install lilypond
- name: Install LilyPond (Windows)
if: contains(matrix.os, 'windows')
run: |
choco install lilypond
echo "C:\Program Files (x86)\LilyPond\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install test requirements
run: |
pip install -r tests/requirements.txt
pip install pytest-github-actions-annotate-failures
- name: Run tests with pytest
run: |
pytest
- name: Run doctests with pytest
run: |
pytest --doctest-modules thebeat/
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install package
run: |
python -m pip install --upgrade pip
pip install .[music_notation]
- name: Install PortAudio, PulseAudio, and D-Bus
run: |
sudo apt update
sudo apt install libportaudio2 pulseaudio dbus-x11
- name: Install documentation requirements
run: |
sudo apt install pandoc
pip install -r docs/requirements.txt
pip install nbconvert
- name: Clear example outputs
run: |
find docs/source -type f -name "*.ipynb" | xargs jupyter nbconvert --clear-output --inplace
- name: Build documentation
run: |
dbus-launch pulseaudio --start # See LABSN/sound-ci-helpers
export PYDEVD_DISABLE_FILE_VALIDATION=1
cd docs
make html