Skip to content

Commit 2c2e1e9

Browse files
lukaw3dlukaw3d
authored andcommitted
Add monthly cron job to update screenshots
1 parent 6af7beb commit 2c2e1e9

3 files changed

Lines changed: 31 additions & 9 deletions

File tree

.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: |

.github/workflows/update-screenshots.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: dump-validators
1+
name: update-screenshots
22

33
on:
4-
# Triggered monthly or manually in https://github.com/oasisprotocol/wallet/actions/workflows/dump-validators.yml
4+
# Triggered monthly or manually in https://github.com/oasisprotocol/wallet/actions/workflows/update-screenshots.yml
55
workflow_dispatch:
66
schedule:
77
- cron: '0 0 1 * *'
@@ -11,25 +11,45 @@ permissions: # Limit secrets.GITHUB_TOKEN permissions
1111
pull-requests: write
1212

1313
jobs:
14-
dump-validators:
14+
update-screenshots:
1515
if: github.repository == 'oasisprotocol/wallet'
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v4
19-
- run: bash ./.github/dump_validators.sh
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+
2039
- name: Create Change Log fragment
2140
env:
2241
FILE_NAME: .changelog/${{ github.event.pull_request.number }}.internal.md
23-
run: echo "Update dumped validators" > "$FILE_NAME"
24-
- name: Create Pull Request with updated dumped validators
42+
run: echo "Update screenshots" > "$FILE_NAME"
43+
- name: Create Pull Request with updated screenshots
2544
# https://github.com/peter-evans/create-pull-request
2645
uses: peter-evans/create-pull-request@v5
2746
with:
2847
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
29-
commit-message: 'Update dumped validators'
30-
title: 'Update dumped validators'
48+
branch: create-pull-request/update-screenshots
49+
commit-message: 'Update screenshots'
50+
title: 'Update screenshots'
3151
body: |
32-
Created by https://github.com/oasisprotocol/wallet/blob/master/.github/workflows/dump-validators.yml
52+
Created by https://github.com/oasisprotocol/wallet/blob/master/.github/workflows/update-screenshots.yml
3353
3454
If CI actions and checks don't run in this PR: close it and reopen.
3555
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

0 commit comments

Comments
 (0)