Skip to content

Commit 908ed3c

Browse files
committed
gh-204: split examples job and run it only on code changes
1 parent f7cedc9 commit 908ed3c

File tree

2 files changed

+29
-13
lines changed

2 files changed

+29
-13
lines changed

.github/workflows/examples.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Test examples
2+
3+
on:
4+
push:
5+
paths:
6+
- "glass/**"
7+
pull_request:
8+
paths:
9+
- "glass/**"
10+
11+
concurrency:
12+
# Skip intermediate builds: always.
13+
# Cancel intermediate builds: only if it is a pull request build.
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
16+
17+
jobs:
18+
test-examples:
19+
name: Test examples
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.x"
28+
cache: pip
29+
- run: pipx run --spec '.[examples]' jupyter execute examples/**/*.ipynb

.github/workflows/test.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,3 @@ jobs:
6262
sudo apt-get update
6363
sudo apt-get install pandoc
6464
- run: pipx run --spec '.[docs]' sphinx-build -W -b html docs _build/html
65-
66-
examples:
67-
name: Examples
68-
runs-on: ubuntu-latest
69-
steps:
70-
- uses: actions/checkout@v4
71-
with:
72-
fetch-depth: 0
73-
- uses: actions/setup-python@v5
74-
with:
75-
python-version: "3.x"
76-
cache: pip
77-
- run: pipx run --spec '.[examples]' jupyter execute examples/**/*.ipynb

0 commit comments

Comments
 (0)