forked from lidofinance/wallets-testing-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (66 loc) · 2.24 KB
/
test.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
69
70
71
72
73
name: Test widgets and wallets integration
on:
pull_request:
workflow_dispatch:
inputs:
notify:
description: 'Notify about test results to the discord channel'
required: false
default: false
type: boolean
schedule:
- cron: '0 */6 * * *'
jobs:
test:
name: Testing
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.15'
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Run lint
run: yarn lint
- name: Build Components
run: yarn build
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run wallets tests
run: xvfb-run --auto-servernum -- yarn test:widgets
working-directory: wallets-testing
env:
RPC_URL: ${{ secrets.RPC_URL }}
WALLET_SECRET_PHRASE: ${{ secrets.WALLET_SECRET_PHRASE }}
WALLET_PASSWORD: ${{ secrets.WALLET_PASSWORD }}
NODE_OPTIONS: --max-old-space-size=4096
- uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: playwright-report
path: wallets-testing/playwright-report/
retention-days: 30
- name: Set embeds
if: ${{ always() }}
working-directory: wallets-testing
run: |
EMBEDS=$(cat embeds.json | jq -c .embeds)
echo "EMBEDS=$EMBEDS" >> $GITHUB_ENV
- name: Discord notification when fails (include mentions)
if: ${{ failure() && (github.event_name == 'schedule' || inputs.notify) }}
uses: lidofinance/[email protected]
with:
args: "<@&1118836223495131167> please take a look at the test results"
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_EMBEDS: ${{ env.EMBEDS }}
- name: Discord notification when success
if: ${{ success() && (github.event_name == 'schedule' || inputs.notify) }}
uses: lidofinance/[email protected]
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_EMBEDS: ${{ env.EMBEDS }}