-
Notifications
You must be signed in to change notification settings - Fork 53
41 lines (38 loc) · 1.12 KB
/
generate_screenshots.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
name: Generate and Upload Screenshots
# https://devblogs.microsoft.com/python/announcing-playwright-for-python-reliable-end-to-end-testing-for-the-web/
# https://github.com/marketplace/actions/run-playwright-tests
on:
pull_request:
types: [labeled]
branches:
- gh-pages
workflow_dispatch:
jobs:
test:
if: ${{ github.event.label.name == 'design_change' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
python -m playwright install --with-deps chromium
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
# Run tests
- name: Run Tests
run: |
python -m pytest -m design
- name: upload images
uses: actions/upload-artifact@v4
with:
name: page_screenshots
path: test_images/
compression-level: 9