-
Notifications
You must be signed in to change notification settings - Fork 8
130 lines (107 loc) · 3.21 KB
/
ci.yml
File metadata and controls
130 lines (107 loc) · 3.21 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
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
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 5 * * 1'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tox_test:
name: tox on ${{ matrix.os }} with ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Run all supported OS for one Python version.
# The test additional Python versions on Linux only.
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.12']
toxenv: [py312-test]
name: ['Python 3.12',]
include:
- python-version: '3.11'
toxenv: py311-test-oldestdeps
name: Python 3.11 and oldest versioned dependencies
os: ubuntu-latest
- python-version: '3.13'
toxenv: py313-test-devdeps
name: Python 3.13 and developer versioned dependencies
os: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: python -m pip install --upgrade tox
- name: Test with tox
run: tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }}
tox_build:
name: Build static site with tox
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: python -m pip install --upgrade tox
- name: Build static site
run: tox -e py312-buildhtml
pixi_test:
name: pixi on ${{ matrix.os }} with ${{ matrix.environment}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Run all supported OS for one Python version, then add a few extra scenarios
os: [ubuntu-latest, macos-latest, windows-latest]
environment: [py311, py312]
steps:
- uses: actions/checkout@v4
- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.9.0
- name: Test all files
run: pixi run test
pixi_build:
name: Build static site with pixi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.9.0
- name: Build static site
run: pixi run build
pixi_build_wasm:
name: Build jupyterlite site with pixi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.9.0
- name: Build jupyterlite site
run: pixi run build_wasm
myst_build:
name: Build and execute static site with myst
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup environment
run: pip install -r requirements.txt
- name: Build site with execution
run: |
myst build --execute 2>&1 |tee /tmp/mystbuild.log
if grep -q "Traceback .most recent call last." /tmp/mystbuild.log; then
exit 1;
else
exit 0;
fi