-
Notifications
You must be signed in to change notification settings - Fork 64
58 lines (56 loc) · 1.8 KB
/
screenshots.yml
File metadata and controls
58 lines (56 loc) · 1.8 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
name: Screenshots
on:
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
screenshots:
name: Regenerate
runs-on: bigmem
if: ${{ !github.event.pull_request.draft }}
steps:
- name: Install git-lfs
run: |
sudo apt install --no-install-recommends -y git-lfs
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install llvmpipe and lavapipe for offscreen canvas
run: |
sudo apt-get update -y -qq
sudo apt-get install --no-install-recommends -y ffmpeg libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- name: Install dev dependencies
run: |
python -m pip install --upgrade pip setuptools
# remove pygfx from install_requires, we install using pygfx@main
sed -i "/pygfx/d" ./setup.py
pip install git+https://github.com/pygfx/pygfx.git@main
pip install -e ".["tests"]"
- name: Show wgpu backend
run:
python -c "from examples.tests.testutils import wgpu_backend; print(wgpu_backend)"
- name: fetch git lfs files
run: |
git lfs fetch --all
git lfs pull
- name: Test examples
env:
PYGFX_EXPECT_LAVAPIPE: true
run: |
# regenerate screenshots
REGENERATE_SCREENSHOTS=1 pytest -v examples
FASTPLOTLIB_NB_TESTS=1 REGENERATE_SCREENSHOTS=1 pytest --nbmake examples/notebooks/
- uses: actions/upload-artifact@v3
if: always()
with:
name: screenshots
path: |
examples/desktop/screenshots/
examples/notebooks/screenshots/