-
Notifications
You must be signed in to change notification settings - Fork 48
87 lines (82 loc) · 2.5 KB
/
audio.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
name: klio-audio unit tests
# May want to add this to a cron, in addition to on push & PRs, to make sure we can
# still build if our unpinned transitive dependencies update
on:
push:
branches:
- master
- develop
- release-*
paths:
- 'audio/**'
pull_request:
branches:
- master
- develop
- release-*
paths:
- 'audio/**'
defaults:
run:
working-directory: audio
jobs:
tests:
name: "klio-audio: py${{ matrix.python-version }} (ubuntu)"
runs-on: "ubuntu-latest"
# TODO: uncomment once we setup Codecov (see below's TODO)
# env:
# USING_COVERAGE: '3.7'
strategy:
matrix:
python-version: ["3.7", "3.8"]
# do not cancel other jobs in matrix if one fails
fail-fast: false
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v1"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade virtualenv tox tox-gh-actions
- name: "Run tox with ${{ matrix.python-version }}"
run: "python -m tox -c tox.ini"
# TODO: uncomment once we setup Codecov
# - name: "Upload coverage to Codecov"
# if: "contains(env.USING_COVERAGE, matrix.python-version)"
# uses: "codecov/codecov-action@v1"
# with:
# file: ./coverage.xml
# fail_ci_if_error: true
package:
name: "klio-audio: verify packaging (ubuntu)"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v1"
with:
python-version: "3.8"
- name: "Install setuptools, wheel, & twine"
run: "python -m pip install -U setuptools wheel twine"
- name: "Build package"
run: "python setup.py build sdist bdist_wheel"
- name: "List result"
run: "ls -l dist"
- name: "Check long_description"
run: "python -m twine check dist/*"
install-dev:
name: "klio-audio: verify dev env (ubuntu)"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v1"
with:
python-version: "3.7"
- name: "Install in dev mode"
run: "python -m pip install -e .[dev]"
- name: "Import package"
run: "python -c 'import klio_audio; print(klio_audio.__version__)'"