-
Notifications
You must be signed in to change notification settings - Fork 574
122 lines (102 loc) · 3.3 KB
/
pull.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
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
111
112
113
114
115
116
117
118
119
120
121
122
name: Pull Request
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
defaults:
run:
working-directory: packages/client
env:
BUCKET_WEB: reactive-trader-web-builds
BUCKET_OPENFIN: reactive-trader-openfin-builds
ENVIRONMENT: env
jobs:
build:
name: Multi E2E
runs-on: ubuntu-20.04
if: ${{ !github.event.pull_request.head.repo.fork }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Node version
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
# - name: Build (web)
# env:
# DOMAIN: https://web.env.reactivetrader.com
# URL_PATH: /pull/${{ github.event.number }}
# VITE_BUILD_VERSION: ${{ github.sha }}
# run: |
# npm run build
# - name: "Authenticate to Google Cloud"
# uses: "google-github-actions/auth@v2"
# with:
# credentials_json: "${{ secrets.GCLOUD_SERVICE_ACCOUNT_JSON }}"
# - name: Set up GCloud
# uses: google-github-actions/setup-gcloud@v2
# with:
# project_id: ${{ secrets.GOOGLE_PROJECT_ID }}
# - name: Deploy (web)
# run: |
# gsutil -m \
# -h "Cache-Control: no-cache" \
# rsync -d -r dist \
# gs://$BUCKET_WEB/pull/${{ github.event.number }}
- name: E2E Run 1
id: e1
continue-on-error: true
env:
E2E_RTC_WEB_ROOT_URL: https://web.env.reactivetrader.com/pull/${{ github.event.number }}
run: npx playwright test --project=web credit.spec.ts
- name: Artifact Upload
uses: actions/upload-artifact@v4
if: steps.e1.outcome == 'failure'
with:
name: playwright-report-1
path: packages/client/playwright-report/
retention-days: 1
- name: E2E Run 2
id: e2
continue-on-error: true
env:
E2E_RTC_WEB_ROOT_URL: https://web.env.reactivetrader.com/pull/${{ github.event.number }}
run: npx playwright test --project=web
- name: Artifact Upload
uses: actions/upload-artifact@v4
if: steps.e2.outcome == 'failure'
with:
name: playwright-report-2
path: packages/client/playwright-report/
retention-days: 1
- name: E2E Run 3
id: e3
continue-on-error: true
env:
E2E_RTC_WEB_ROOT_URL: https://web.env.reactivetrader.com/pull/${{ github.event.number }}
run: npx playwright test --project=web credit.spec.ts
- name: Artifact Upload
uses: actions/upload-artifact@v4
if: steps.e3.outcome == 'failure'
with:
name: playwright-report-3
path: packages/client/playwright-report/
retention-days: 1
- name: E2E Run 4
id: e4
continue-on-error: true
env:
E2E_RTC_WEB_ROOT_URL: https://web.env.reactivetrader.com/pull/${{ github.event.number }}
run: npx playwright test --project=web
- name: Artifact Upload
uses: actions/upload-artifact@v4
if: steps.e4.outcome == 'failure'
with:
name: playwright-report-4
path: packages/client/playwright-report/
retention-days: 1