-
Notifications
You must be signed in to change notification settings - Fork 29
59 lines (56 loc) · 1.66 KB
/
main.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
name: Tests
on: [pull_request, merge_group]
jobs:
docs:
name: Sample Docs Build
runs-on: ubuntu-latest
if: github.repository_owner == 'Qiskit'
container:
# Keep in sync with tests/js/Dockerfile's base image.
image: mcr.microsoft.com/playwright:v1.34.0-jammy
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fix permissions for sphinx-theme-builder
run: chown -R $(id -u):$(id -g) .
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install Node.js dependencies
run: npm ci
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install Ubuntu deps
run: apt-get update && apt-get install -y pandoc graphviz
- name: Install tox
run: python -m pip install -U tox
- name: Run lint
run: tox run -e lint
- name: Run Pytest
run: tox run -e py
- name: Create artifacts/ folder
run: mkdir artifacts
- name: Build Ecosystem theme
run: |
tox run -e docs
tar -zcvf html_docs.tar.gz example_docs/docs/_build
mv html_docs.tar.gz artifacts/.
- name: Upload Sphinx builds
uses: actions/upload-artifact@v4
if: always()
with:
name: html_docs
path: artifacts
- name: Run visual regression tests
run: |
npm run _run-tests
- name: Upload snapshot results
if: failure()
uses: actions/upload-artifact@v4
with:
name: snapshot_results
path: snapshot_results/