-
Notifications
You must be signed in to change notification settings - Fork 8
65 lines (56 loc) · 1.3 KB
/
examples.yml
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
---
name: Test examples
on:
push:
paths:
- glass/**
branches:
- main
pull_request:
paths:
- glass/**
types:
- opened
- ready_for_review
- reopened
- synchronize
concurrency:
cancel-in-progress: true
group: >-
${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
test-examples:
if: github.event.pull_request.draft == false
name: Test examples
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache nox
uses: actions/cache@v4
with:
key: test-${{ hashFiles('pyproject.toml') }}
path: .nox
- name: Set up Python
uses: actions/setup-python@v5
with:
cache-dependency-path: pyproject.toml
cache: pip
python-version: 3.x
- name: Install nox
run: python -m pip install nox
- name: Run examples
run: nox -s examples
env:
FORCE_COLOR: 1
- name: Generate HTML
run: nox -s examples -- html
env:
FORCE_COLOR: 1
- name: Upload artefact
uses: actions/upload-artifact@v4
with:
name: Examples
path: examples/**/*.html