Skip to content

Commit 899efa5

Browse files
authored
Merge pull request #2049 from oasisprotocol/lw/ci-screenshots
Add monthly cron job to update screenshots
2 parents b65a0b2 + 2c2e1e9 commit 899efa5

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

.changelog/2049.process.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add monthly cron job to update screenshots

.github/workflows/dump-validators.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
uses: peter-evans/create-pull-request@v5
2727
with:
2828
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
29+
branch: create-pull-request/dump-validators
2930
commit-message: 'Update dumped validators'
3031
title: 'Update dumped validators'
3132
body: |
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: update-screenshots
2+
3+
on:
4+
# Triggered monthly or manually in https://github.com/oasisprotocol/wallet/actions/workflows/update-screenshots.yml
5+
workflow_dispatch:
6+
schedule:
7+
- cron: '0 0 1 * *'
8+
9+
permissions: # Limit secrets.GITHUB_TOKEN permissions
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
update-screenshots:
15+
if: github.repository == 'oasisprotocol/wallet'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Set up Node.js 18
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '18.x'
23+
cache: yarn
24+
- name: Install dependencies
25+
run: yarn install --frozen-lockfile
26+
27+
- run: REACT_APP_E2E_TEST=1 yarn start &
28+
- name: Install playwright's npm dependencies
29+
working-directory: ./playwright/
30+
run: yarn install --frozen-lockfile
31+
- name: Install playwright's system dependencies
32+
working-directory: ./playwright/
33+
run: npx playwright install --with-deps
34+
- run: npx wait-on http://localhost:3000/ --timeout 60000
35+
- name: Run playwright tests (with xvfb-run to support headed extension test)
36+
working-directory: ./playwright/
37+
run: xvfb-run yarn test:screenshots
38+
39+
- name: Create Change Log fragment
40+
env:
41+
FILE_NAME: .changelog/${{ github.event.pull_request.number }}.internal.md
42+
run: echo "Update screenshots" > "$FILE_NAME"
43+
- name: Create Pull Request with updated screenshots
44+
# https://github.com/peter-evans/create-pull-request
45+
uses: peter-evans/create-pull-request@v5
46+
with:
47+
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
48+
branch: create-pull-request/update-screenshots
49+
commit-message: 'Update screenshots'
50+
title: 'Update screenshots'
51+
body: |
52+
Created by https://github.com/oasisprotocol/wallet/blob/master/.github/workflows/update-screenshots.yml
53+
54+
If CI actions and checks don't run in this PR: close it and reopen.
55+
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
56+
labels: bot

0 commit comments

Comments
 (0)