forked from OpenRefine/OpenRefine
-
Notifications
You must be signed in to change notification settings - Fork 0
125 lines (112 loc) · 3.41 KB
/
Copy pathpull_request_e2e.yml
File metadata and controls
125 lines (112 loc) · 3.41 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: E2E CI
on:
pull_request:
paths-ignore:
- 'main/IDEs/**'
- 'main/webapp/modules/core/langs/**'
- 'extensions/database/module/langs/**'
- 'extensions/pc-axis/module/langs/**'
- 'extensions/wikibase/module/langs/**'
branches:
- master
permissions: read-all
jobs:
lint_cypress:
name: Lint Cypress tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: '20'
cache: 'yarn'
cache-dependency-path: main/tests/cypress/yarn.lock
- name: Install test dependencies
working-directory: main/tests/cypress
run: |
npm install --global yarn
yarn install --frozen-lockfile
env:
CYPRESS_INSTALL_BINARY: '0'
- name: Check Cypress test formatting and linting
working-directory: main/tests/cypress
run: yarn lint
prepare_e2e_test_matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: '20'
- id: set-matrix
run: npm install --save glob@8.1.0 && node main/tests/cypress/build-test-matrix.js >> $GITHUB_OUTPUT
env:
browsers: chrome
e2e_test:
name: e2e_test ${{ matrix.specs.group }}
needs: prepare_e2e_test_matrix
runs-on: ubuntu-latest
strategy:
matrix: ${{fromJSON(needs.prepare_e2e_test_matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v7
- name: Set up Java 21
uses: actions/setup-java@v5.6.0
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'
- name: Build OpenRefine
run: ./refine build
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: '20'
- name: Restore Tests dependency cache
uses: actions/cache@v6
with:
path: |
~/cache
~/.cache
**/node_modules
!~/cache/exclude
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn
- name: Install test dependencies
run: |
cd ./main/tests/cypress
npm i -g yarn
yarn install
- name: Test with Cypress on ${{ matrix.browser }}
run: |
echo REFINE_MIN_MEMORY=1400M >> ./refine.ini
echo REFINE_MEMORY=4096M >> ./refine.ini
./refine e2e_tests
env:
CYPRESS_BROWSER: ${{ matrix.browser }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_PROJECT_ID: ${{ vars.CYPRESS_PROJECT_ID }}
CYPRESS_CI_BUILD_ID: '${{ github.run_id }}'
CYPRESS_SPECS: ${{ matrix.specs.paths }}
CYPRESS_GROUP: ${{ matrix.specs.group }}
misc_integration_test:
name: Misc integration tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Java 21
uses: actions/setup-java@v5.6.0
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'
- name: Build OpenRefine
run: ./refine build
- name: Test Unix Domain Socket connectivity
run: |
./refine uds_tests