-
Notifications
You must be signed in to change notification settings - Fork 95
61 lines (58 loc) · 1.59 KB
/
test.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
name: "Tests"
on:
push:
branches:
- '**'
paths-ignore:
- 'mkdocs.yml'
- 'docs/**'
- '.github/workflows/deploy-static-site.yml'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
main:
name: Run tests
runs-on: [self-hosted, Linux, X64]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9.16'
cache: 'pip'
- run: pip install black flake8 isort
- run: make source_code_check_format
- run: pip install -e .
- run: pytest
notebooks-changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
notebooks: ${{ steps.filter.outputs.changed_files }}
has-notebooks-changes: ${{ steps.filter.outputs.changed }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
list-files: json
filters: |
changed:
- added|modified: '**.ipynb'
notebook:
name: Run notebook
needs: notebooks-changes
if: ${{ needs.notebooks-changes.outputs.has-notebooks-changes == 'true' }}
strategy:
matrix:
notebook: ${{ fromJSON(needs.notebooks-changes.outputs.notebooks) }}
runs-on: [ self-hosted, Linux, X64 ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.9.16'
cache: 'pip'
- run: pip install jupyter nbconvert
- run: jupyter nbconvert --execute --clear-output ${{ matrix.notebook }}