-
Notifications
You must be signed in to change notification settings - Fork 13
90 lines (77 loc) · 2.24 KB
/
build.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
88
89
90
name: build
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
build_single:
name: Build
if: github.event.pull_request.draft == true
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-python-and-package
with:
python-version: '3.11'
- name: Run unit tests
run: pytest -v
- name: Verify that we can build the package
run: python setup.py sdist bdist_wheel
build_all:
name: Build for (${{ matrix.python-version }}, ${{ matrix.os }})
if: github.event.pull_request.draft == false
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.9', '3.11']
exclude:
# already tested in build_single job
- python-version: 3.11
os: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-python-and-package
with:
python-version: ${{ matrix.python-version }}
- name: Run unit tests
run: python -m pytest -v
#- name: Verify that we can build the package
# run: python setup.py sdist bdist_wheel
test_downloader:
name: Test file downloader
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-python-and-package
with:
python-version: '3.11'
extras-require: dev
- name: Run downloader test
run: python -m pytest -v --downloader -k downloader
test_dashboard:
name: Test dashboard
if: always()
#github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-python-and-package
with:
python-version: '3.11'
extras-require: dev,dashboard
- name: Ensure browser is installed
run: python -m playwright install chromium
- name: Test dashboard
run: pytest -v -m dashboard --dashboard