-
Notifications
You must be signed in to change notification settings - Fork 113
53 lines (52 loc) · 1.76 KB
/
Copy pathtest.yml
File metadata and controls
53 lines (52 loc) · 1.76 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
name: Test
on:
pull_request:
branches:
- development
schedule:
- cron: '0 0 * * 1-5' # Every weekday at midnight UTC
workflow_dispatch:
inputs:
base_url:
description: 'Base URL to run the tests against'
required: false
default: 'https://portalbridge.com'
jobs:
e2e:
runs-on: ubuntu-latest
continue-on-error: true
environment: ci
permissions: read-all
defaults:
run:
working-directory: './'
container:
image: mcr.microsoft.com/playwright:v1.54.1-noble
options: --user 1001 # Default user ID in Ubuntu
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install dependencies
run: npm ci
- name: Run Playwright tests with wallet
if: ${{ startsWith(github.event.inputs.base_url, 'http://localhost') || github.event_name == 'schedule' }}
run: npm run test:e2e:with-wallet
env:
BASE_URL: ${{ github.event.inputs.base_url || 'http://localhost:5173' }}
REACT_APP_TEST_EVM_ADDR: ${{ secrets.REACT_APP_TEST_EVM_ADDR }}
REACT_APP_TEST_EVM_PK: ${{ secrets.REACT_APP_TEST_EVM_PK }}
- name: Run Playwright tests without wallet
if: ${{ !startsWith(github.event.inputs.base_url, 'http://localhost') || github.event_name == 'pull_request' }}
run: npm run test:e2e:without-wallet
env:
BASE_URL: ${{ github.event.inputs.base_url || 'http://localhost:5173' }}
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30