-
Notifications
You must be signed in to change notification settings - Fork 373
146 lines (118 loc) · 4.35 KB
/
CI-e2e-notebooks.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: CI e2e notebooks
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ui-build:
env:
node-version: 16.x
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
- name: Install yarn
run: npm install yarn -g
- name: Install yarn dependencies
run: yarn install --frozen-lock-file
- name: Build Typescript
run: yarn buildall
- name: Upload the build result
uses: actions/upload-artifact@v3
with:
name: raiwidgets-js
path: raiwidgets/raiwidgets/widget
ci-e2e-notebook:
needs: ui-build
env:
node-version: 16.x
strategy:
fail-fast: false
matrix:
# TODO: add macos
operatingSystem: [ubuntu-latest, windows-latest]
pythonVersion: [3.8, 3.9, "3.10"]
flights: ["", "dataBalanceExperience"]
notebookGroup: ["nb_group_1", "nb_group_2", "nb_group_3"]
exclude:
# nb_group_3 includes only forecasting which doesn't change
# with the data balance experience flight
- notebookGroup: "nb_group_3"
flights: "dataBalanceExperience"
runs-on: ${{ matrix.operatingSystem }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
- name: Install yarn
run: npm install yarn -g
- name: Install yarn dependencies
run: yarn install --frozen-lock-file
- name: Download the UI build result
uses: actions/download-artifact@v2
with:
name: raiwidgets-js
path: raiwidgets/raiwidgets/widget
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.pythonVersion }}
- name: Install pytorch
shell: bash -l {0}
run: |
conda install --yes --quiet pytorch torchvision captum cpuonly -c pytorch
- name: Setup tools
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools
pip install --upgrade "pip-tools<=7.1.0"
- name: Install dependencies
shell: bash -l {0}
run: |
pip install -r requirements-dev.txt
pip install -v -e .
working-directory: raiwidgets
- name: Pip freeze
shell: bash -l {0}
run: |
pip freeze > installed-requirements-dev.txt
cat installed-requirements-dev.txt
working-directory: raiwidgets
- name: Upload requirements
uses: actions/upload-artifact@v3
with:
name: requirements-dev.txt
path: raiwidgets/installed-requirements-dev.txt
# keep list of notebooks in sync with scripts/e2e-widget.js, create new notebook group if necessary
- if: ${{ matrix.notebookGroup == 'nb_group_1'}}
name: Run widget tests
shell: bash -l {0}
run: |
yarn e2e-widget -n "responsibleaidashboard-census-classification-model-debugging" -f ${{ matrix.flights }}
yarn e2e-widget -n "responsibleaidashboard-diabetes-regression-model-debugging" -f ${{ matrix.flights }}
yarn e2e-widget -n "responsibleaidashboard-housing-decision-making" -f ${{ matrix.flights }}
- if: ${{ matrix.notebookGroup == 'nb_group_2'}}
name: Run widget tests
shell: bash -l {0}
run: |
yarn e2e-widget -n "responsibleaidashboard-housing-classification-model-debugging" -f ${{ matrix.flights }}
yarn e2e-widget -n "responsibleaidashboard-diabetes-decision-making" -f ${{ matrix.flights }}
yarn e2e-widget -n "responsibleaidashboard-multiclass-dnn-model-debugging" -f ${{ matrix.flights }}
- if: ${{ matrix.notebookGroup == 'nb_group_3'}}
name: Run widget tests
shell: bash -l {0}
run: |
yarn e2e-widget -n "responsibleaidashboard-orange-juice-forecasting" -f ${{ matrix.flights }}
- name: Upload e2e test screen shot
if: always()
uses: actions/upload-artifact@v3
with:
name: raiwidgets-e2e-screen-shot
path: ./dist/cypress