-
Notifications
You must be signed in to change notification settings - Fork 31
35 lines (33 loc) · 1.19 KB
/
notebook-local-verify.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
name: Notebook LocalProvider tests
on:
pull_request:
branches: [ main ]
jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: patch notebooks
shell: bash
run: |
for f in tests/basic/*.py; do sed -i "s/import ServerlessProvider/import LocalProvider/;s/= ServerlessProvider(/= LocalProvider(/;/token=os\.environ\.get/d;/host=os\.environ\.get/d" "$f"; done
for f in tests/experimental/*.py; do sed -i "s/import ServerlessProvider/import LocalProvider/;s/= ServerlessProvider(/= LocalProvider(/;/token=os\.environ\.get/d;/host=os\.environ\.get/d" "$f"; done
- name: install dependencies
shell: bash
run: pip install client/
- name: Run basic notebooks
shell: bash
run: |
cd tests/basic
for f in *.py; do echo "$f" && IN_TEST=True python "$f"; done
cd -
- name: Run experimental notebooks
shell: bash
run: |
cd tests/experimental
for f in *.py; do echo "$f" && IN_TEST=True python "$f"; done
cd -