-
Notifications
You must be signed in to change notification settings - Fork 13
85 lines (65 loc) · 1.93 KB
/
ci.yml
File metadata and controls
85 lines (65 loc) · 1.93 KB
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
name: CI
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies on macOS
if: runner.os == 'macOS'
run: brew install ffmpeg
- name: Install system dependencies on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg
- name: Install system dependencies on Windows
if: runner.os == 'Windows'
run: choco install ffmpeg -y
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install package and dependencies
run: pip install -e ".[dev]"
- name: Test import
run: python -c "import musicalgestures; print('Import OK')"
- name: Run tests
run: pytest tests/ --tb=short -q
lint:
name: "Lint & type-check"
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install lint dependencies
run: pip install ruff mypy
- name: Ruff lint
run: ruff check musicalgestures/ --ignore E501 --exit-zero
- name: Ruff format check
run: ruff format --check musicalgestures/ || true
- name: Mypy type check
run: mypy musicalgestures/ --ignore-missing-imports --no-error-summary || true