forked from Zenobia0000/iSpan_python-DA-cookbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.27 KB
/
Copy pathcourse-notebooks.yml
File metadata and controls
40 lines (34 loc) · 1.27 KB
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
name: Course Notebooks CI
on:
push:
branches: [main]
pull_request:
paths:
- 'Special-Edition_python_DA/Python_DA_Course/**'
jobs:
smoke-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r Special-Edition_python_DA/Python_DA_Course/requirements.txt || \
pip install numpy pandas matplotlib seaborn plotly pytest jupyter
- name: Run smoke tests (pytest or static fallback)
working-directory: Special-Edition_python_DA/Python_DA_Course
run: |
python -m pytest tests/ -v || \
python -c "import json, ast, pathlib; [ast.parse('\n'.join(''.join(c['source']) for c in json.load(open(p))['cells'] if c['cell_type']=='code')) for p in pathlib.Path('.').glob('M*/S*.ipynb')]; print('fallback static check OK')"
- name: Upload test artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: Special-Edition_python_DA/Python_DA_Course/tests/
if-no-files-found: ignore