-
Notifications
You must be signed in to change notification settings - Fork 301
80 lines (74 loc) · 2.22 KB
/
run-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
# Link repository with GitHub Actions
# https://docs.github.com/en/actions/learn-github-actions/introduction-to-github-actions
name: run-tests
on:
push:
branches:
- main
pull_request:
branches:
- main
# Set the language, install dependencies, and run the tests
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip poetry
pip install ".[dev]"
- name: Install libsndfile
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get install -y libsndfile1
- name: Run tests
run: pytest
- name: Validate poetry file
run: poetry check
- name: Check source code format
run: black --check --diff .
test-deb10-i386:
runs-on: ubuntu-latest
container: i386/debian:10
steps:
- name: Install dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends \
python3-matplotlib \
python3-numpy \
python3-pandas \
python3-requests \
python3-scipy \
python3-soundfile \
python3-pytest \
git
# Note: "actions/checkout@v2" requires libstdc++6:amd64 to be
# installed in the container. To keep things simple, use
# "actions/checkout@v1" instead.
# https://github.com/actions/checkout/issues/334
- uses: actions/checkout@v1
- name: Run tests
run: |
pytest-3
build-documentation:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build documentation
run: |
cd docs
make html