-
Notifications
You must be signed in to change notification settings - Fork 13
99 lines (97 loc) · 2.46 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
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
# things not included
# language
# notifications - no email notifications set up
name: tests
on:
push:
branches:
- main
pull_request:
branches:
- '*'
workflow_dispatch:
schedule:
- cron: '0 20 * * SUN'
jobs:
pre_commit:
name: Run pre-commit
runs-on: "ubuntu-latest"
steps:
- uses: holoviz-dev/holoviz_tasks/pre-commit@v0
test_suite:
name: Test on ${{ matrix.python-version }}, ${{ matrix.os }}
needs: [pre_commit]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest']
python-version: ['3.9', '3.10', '3.11', '3.12']
timeout-minutes: 30
defaults:
run:
shell: bash -l {0}
env:
PYTHON_VERSION: ${{ matrix.python-version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: "100"
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Fetch
run: git fetch --prune --tags
- name: env setup
run: |
set -xe
python -VV
python -m pip install --upgrade pip
python -m pip install -e ".[tests]"
- name: pip list
run: pip list
- name: tests
run: pytest nbsite
build_docs:
name: Documentation
needs: [pre_commit]
runs-on: 'ubuntu-latest'
timeout-minutes: 120
defaults:
run:
shell: bash -l {0}
env:
DESC: "Documentation build"
steps:
- uses: actions/checkout@v4
- name: Fetch unshallow
run: git fetch --prune --tags --unshallow -f
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: set up env
run: |
cd site
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- name: build docs
run: |
cd site
source .venv/bin/activate
doit all_build
- name: Deploy dev
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.ACCESS_TOKEN }}
external_repository: pyviz-dev/nbsite-dev
publish_dir: ./site/builtdocs
force_orphan: true
- name: clean up
run: |
cd site
source .venv/bin/activate
doit clean --clean-dep all_build
- name: check no leftover
run: git diff --quiet || exit 1