-
Notifications
You must be signed in to change notification settings - Fork 31
123 lines (103 loc) · 3.47 KB
/
e2e.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
123
# This workflow will do a production build of the application, and test it end-to-end with the latest Deephaven Core server.
name: Build and End-to-end Tests
on:
push:
branches:
- main
- 'release/**'
- 'feature/**'
pull_request:
branches:
- main
- 'release/**'
- 'feature/**'
env:
DHC_VERSION: edge
jobs:
build:
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-build
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and Save docker image
run: |
docker build -t e2e-ci:test -f ./tests/docker-scripts/Dockerfile .
docker save e2e-ci -o e2e-ci.tar.gz
- name: Store docker build for test matrix
uses: actions/upload-artifact@v4
with:
name: image-cache
path: e2e-ci.tar.gz
retention-days: 1
e2e-tests:
runs-on: ubuntu-22.04
needs: build
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-e2e-tests-${{ matrix.config }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
config: [chromium-1-1, firefox-1-1, webkit-1-2, webkit-2-2]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download docker image for test matrix
uses: actions/download-artifact@v4
with:
name: image-cache
- name: Load docker image
run: docker load -i e2e-ci.tar.gz
- name: Extract browser config
id: config
env:
MATRIX_CONFIG: ${{ matrix.config }}
run: |
echo "BROWSER=${MATRIX_CONFIG:0:-4}" >> $GITHUB_ENV
echo "SHARD=${MATRIX_CONFIG: -3:1}" >> $GITHUB_ENV
echo "SHARD_TOTAL=${MATRIX_CONFIG: -1:1}" >> $GITHUB_ENV
- name: Run tests
run: './tests/docker-scripts/run.sh e2e-ci-matrix'
- name: Upload Playwright report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report-blob-${{ matrix.config }}
path: blob-report/
retention-days: 1
- name: Dump server logs
if: failure()
run: docker logs dhc-server > /tmp/server-log.txt
- name: Upload server logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: server-logs-${{ matrix.config }}
path: /tmp/server-log.txt
retention-days: 14
merge-reports:
if: ${{ !cancelled() }}
runs-on: ubuntu-22.04
needs: [e2e-tests]
steps:
- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
pattern: playwright-report-blob-*
- name: Merge into HTML Report
run: |
mkdir -p all-blob-reports
mv playwright-report-blob-chromium-1-1/report-chromium-1.zip all-blob-reports/chromium-1-1.zip
mv playwright-report-blob-firefox-1-1/report-firefox-1.zip all-blob-reports/firefox-1-1.zip
mv playwright-report-blob-webkit-1-2/report-webkit-1.zip all-blob-reports/webkit-1-2.zip
mv playwright-report-blob-webkit-2-2/report-webkit-2.zip all-blob-reports/webkit-2-2.zip
npx playwright merge-reports --reporter html,github ./all-blob-reports
- name: Upload HTML report
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report
retention-days: 30