-
Notifications
You must be signed in to change notification settings - Fork 22
75 lines (72 loc) · 2.02 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
name: CI
on:
workflow_dispatch:
push:
branches: [iblrigv8]
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
name: ruff check
with:
args: 'check --output-format=github'
- uses: chartboost/ruff-action@v1
name: ruff format
with:
args: 'format --check'
tests:
name: build (${{ matrix.python-version }}, ${{ matrix.os }})
needs: ruff
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.10"]
steps:
- name: Checkout iblrig repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: ${{ matrix.python-version }}
cache: true
- name: Install requirements
run: pdm sync -G project-extraction -dG test -dG ci
- name: Install audio library (Ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y libportaudio2
- name: iblrig unit tests
run: pdm run pytest
- 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: pdm export -o requirements_frozen.txt --no-hashes
- name: Store frozen requirements as artifacts
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: requirements_frozen
path: requirements_frozen.txt
finish:
needs: [ruff, tests]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true