-
Notifications
You must be signed in to change notification settings - Fork 70
68 lines (51 loc) · 1.8 KB
/
_create-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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Create screenshots
on:
workflow_call:
concurrency:
group: create-screenshots-${{ github.ref }}
cancel-in-progress: true
jobs:
run:
runs-on: ubuntu-latest
strategy:
matrix:
theme: [default, bootstrap, material, classic, fluent]
steps:
- name: Setup Firefox
run: |
sudo wget -O /tmp/firefox.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US"
sudo tar xjf /tmp/firefox.tar.bz2 -C /opt
sudo ln -s /opt/firefox/firefox /usr/local/bin/firefox
- name: Print Firefox version
run: firefox --version
- name: Checkout branch
uses: actions/checkout@v4
- name: Setup node
id: setup-node
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Use cache for root node_modules
id: cache-root-node_modules
uses: actions/cache@v4
with:
path: node_modules
key: root-node_modules-${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('package-lock.json') }}
- name: Install
if: steps.cache-root-node_modules.outputs.cache-hit != 'true'
run: npm ci --no-audit --no-fund
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: .tmp
- name: Unpack artifacts
run: find .tmp -name "*.tar" -type f -exec tar -xf {} \;
- name: Create screenshots
run: ./build/create-screenshots.sh ${{ matrix.theme }}
- name: Pack screenshots
run: tar -cf screenshots-${{ matrix.theme }}.tar tests/_output/${{ matrix.theme }}
- name: Upload screenshots
uses: actions/upload-artifact@v4
with:
name: screenshots-${{ matrix.theme }}
path: screenshots-${{ matrix.theme }}.tar