-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
51 lines (48 loc) · 1.5 KB
/
Copy pathrun-percy.yml
File metadata and controls
51 lines (48 loc) · 1.5 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
name: Run Percy
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
permissions:
contents: read
jobs:
python-311-percy:
name: Run Percy
runs-on: ubuntu-latest
env:
PERCY_ENABLED: "True"
PERCY_PROJECT: plotly/plotly.py
PERCY_TOKEN: ${{ secrets.PERCY_PYTHON_TOKEN_V0 }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
- name: Set up Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
- name: Set up Chrome
uses: browser-actions/setup-chrome@48ad923757ca74d66703209fe939badbdf80f2f4 # v2.2.0
with:
install-chromedriver: true
- name: Set up uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
- name: Install requirements
run: |
uv venv
source .venv/bin/activate
uv sync --locked --extra dev_optional
- name: Build HTML figures (Pandas 2)
run: |
source .venv/bin/activate
python tests/percy/plotly-express.py
- name: Run percy snapshots
run: |
npm i @percy/cli
npx percy snapshot -c tests/percy/snapshots.yml tests/percy/
rm tests/percy/*.html