-
Notifications
You must be signed in to change notification settings - Fork 78
111 lines (98 loc) · 3.74 KB
/
pullrequests.yml
File metadata and controls
111 lines (98 loc) · 3.74 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: PullRequest tests
on:
push:
paths-ignore:
- .github/**/*
tags-ignore:
- '**'
pull_request:
paths-ignore:
- '**.md'
branches:
- 'release-candidate-*'
- '!renovate/**'
- '!dependabot/**'
env:
TERRA_MAINNET_URL: ${{ secrets.VUE_APP_TERRA_MAINNET_URL }}
AVALANCHE_MAINNET_NODE: ${{ secrets.VUE_APP_AVALANCHE_MAINNET_NODE }}
AVALANCHE_TESTNET_NODE: ${{ secrets.VUE_APP_AVALANCHE_TESTNET_NODE }}
NEAR_MAINNET_URL: ${{ secrets.VUE_APP_NEAR_MAINNET_URL }}
TRANSAK_WIDGET_URL_STAGE: ${{ secrets.VUE_APP_TRANSAK_WIDGET_URL_STAGE }}
TRANSAK_API_KEY_STAGE: ${{ secrets.VUE_APP_TRANSAK_API_KEY_STAGE }}
TRANSAK_DEFAULT_FIAT_CURRENCY: ${{ secrets.VUE_APP_TRANSAK_DEFAULT_FIAT_CURRENCY }}
SEED_WORDS: ${{ secrets.TEST_NET_SEED_WORDS }}
TWENTY_FOUR_SEEDS: ${{ secrets.TWENTY_FOUR_SEEDS }}
TEST_WALLET_PASSWORD: ${{ secrets.TEST_WALLET_PASSWORD }}
jobs:
pull_request_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
node-version: 16
fetch-depth: 0
- name: Build project
uses: actions/setup-node@v3.7.0
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
with:
node-version: 16
# Create screenshots directory
- run: mkdir screenshots
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Restore yarn cache
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
- run: |
echo VUE_APP_TERRA_MAINNET_URL =$TERRA_MAINNET_URL >> .env
echo VUE_APP_AVALANCHE_MAINNET_NODE =$AVALANCHE_MAINNET_NODE >> .env
echo VUE_APP_AVALANCHE_TESTNET_NODE =$AVALANCHE_TESTNET_NODE >> .env
echo VUE_APP_NEAR_MAINNET_URL =$NEAR_MAINNET_URL >> .env
echo VUE_APP_TRANSAK_WIDGET_URL_STAGE =$TRANSAK_WIDGET_URL_STAGE >> .env
echo VUE_APP_TRANSAK_API_KEY_STAGE =$TRANSAK_API_KEY_STAGE >> .env
echo VUE_APP_TRANSAK_DEFAULT_FIAT_CURRENCY =$TRANSAK_DEFAULT_FIAT_CURRENCY >> .env
# Create Dev Wallet with Dev agent for pull request tests.
- name: Set development manifest (patch for DEV)
run: |
export NODE_OPTIONS="--max-old-space-size=5120"
jq --argjson icons "{\"16\": \"icons/dev/16x16.png\",\"48\": \"icons/dev/48x48.png\",\"128\": \"icons/dev/128x128.png\"}" '.icons = $icons | .browser_action.default_icon = $icons | .name = "Liquality Wallet - Dev"' ./src/manifest.json > ./src/manifest.tmp
mv ./src/manifest.tmp ./src/manifest.json
yarn install
yarn lint
yarn build
# - name: Create wallet artifact
# uses: actions/upload-artifact@v2.3.1
# if: always()
# with:
# name: pull-request-wallet
# path: dist
# if-no-files-found: ignore
# retention-days: 30
- name: Run Smoke tests against PullRequest
uses: beemi/puppeteer-headful@v1.0.11
env:
CI: 'true'
DISPLAY: :99
with:
args: yarn test:pullrequest
- name: Save Screenshots
uses: actions/upload-artifact@v3.1.2
if: always()
with:
name: screenshots
path: screenshots
if-no-files-found: ignore
# - name: Discord notification
# uses: sarisia/actions-status-discord@v1
# if: always()
# with:
# webhook: ${{ secrets.DISCORD_PULL_REQUESTS_WEBHOOK }}
# title: "${{ github.workflow}}"