-
Notifications
You must be signed in to change notification settings - Fork 22
91 lines (78 loc) · 2.46 KB
/
main.yaml
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
name: iblrigv8 CI
on:
push:
branches: [iblrigv8]
paths-ignore:
- 'docs/**'
pull_request:
branches: [iblrigv8]
paths-ignore:
- 'docs/**'
jobs:
tests:
name: build (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.10"]
steps:
- name: Checkout iblrig repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'pyproject.toml'
- name: flake8
run: |
pip install --upgrade pip
pip install flake8 --quiet
python -m flake8
- name: install requirements
shell: bash -l {0}
run: |
pip install --editable .[DEV]
- name: Install audio library (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y libportaudio2
- name: Create config files (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
cp settings/hardware_settings_template.yaml settings/hardware_settings.yaml
cp settings/iblrig_settings_template.yaml settings/iblrig_settings.yaml
- name: Create config files (Windows)
if: matrix.os == 'windows-latest'
run: |
copy settings\hardware_settings_template.yaml settings\hardware_settings.yaml
copy settings\iblrig_settings_template.yaml settings\iblrig_settings.yaml
- name: iblrig unit tests
run: |
coverage run -m unittest discover -s ./iblrig/test -t .
coverage xml
- name: coveralls.io
uses: coverallsapp/github-action@v2
with:
flag-name: ${{ matrix.python-version }}, ${{ matrix.os }}
parallel: true
file: coverage.xml
compare-ref: iblrigv8
- name: Generate requirements_frozen.txt
run: pip freeze > requirements_frozen.txt
- name: Store frozen requirements as artifacts
uses: actions/upload-artifact@v3
with:
name: requirements_frozen
path: requirements_frozen.txt
finish:
needs: tests
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true