-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.31 KB
/
Copy pathtesting.yml
File metadata and controls
62 lines (52 loc) · 1.31 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Tests
on:
push:
branches:
- main
- devel
pull_request:
branches:
- main
- devel
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10' # Adjust as needed
# Cache pip dependencies
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y pandoc
- name: Install project
run: |
pip install --upgrade pip
pip install ".[dev]"
- name: Run tests
run: |
pytest .
- name: Test tutorials
run: |
jupyter nbconvert --to notebook --execute tutorials/*.ipynb --output-dir=/tmp --ExecutePreprocessor.timeout=300
- name: Test docs build
run: |
pip install ".[docs]"
cd docs
make clean
make html
cd ..
ls docs/build/html/index.html