-
Notifications
You must be signed in to change notification settings - Fork 15
76 lines (66 loc) · 2 KB
/
main.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
name: CI
on:
push: # on push commits at any branch
pull_request: # on external PR
workflow_dispatch: # on demand
jobs:
build:
runs-on: ubuntu-latest
env:
TRAVIS: 'true' # Skip tests requiring data
strategy:
matrix:
python-version:
- '2.7'
- '3.8' # oldest supported Py3
- '3' # newest supported Py3
name: Python ${{ matrix.python-version }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
if: matrix.python-version != '2.7'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python 2.7
if: matrix.python-version == '2.7'
run: |
sudo apt-get update
sudo apt-get install -y python2.7 python2.7-dev
sudo ln -sf python2.7 /usr/bin/python
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python get-pip.py
rm get-pip.py
pip install --upgrade pip setuptools wheel
- name: Install system dependencies
run: |
sudo apt update -qq
sudo apt install -y libsndfile1 portaudio19-dev
- name: Install dependencies
run: |
pip install cython # required by some versions of numpy
pip install .
- uses: BSFishy/pip-action@v1
with:
packages: |
PyAudio
pytest
pytest-cov
coveralls
- name: Unit tests
run: |
pytest
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: python-${{ matrix.python-version }}
coveralls_finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true