55 lines (52 loc) · 1.57 KB
/
subflow_e2e_test.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
name: E2E Test
env:
JAVA_VERSION: '17'
JAVA_DISTRIBUTION: 'adopt'
on:
workflow_dispatch:
workflow_call:
jobs:
execute:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14.0-alpine3.14
env:
POSTGRES_USER: tafeladmin
POSTGRES_PASSWORD: tafeladmin
POSTGRES_DB: tafeladmin
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.3.0
with:
node-version-file: 'frontend/src/main/webapp/.nvmrc'
cache: 'npm'
cache-dependency-path: 'frontend/src/main/webapp/package-lock.json'
- name: Set up JDK 17
uses: actions/setup-java@v3.3.0
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
cache: 'maven'
- uses: actions/download-artifact@v3
with:
name: admin-jarfile
path: ./artifact
- run: npm install
working-directory: frontend/src/main/webapp
- name: Run cypress
run: |
java -Dspring.profiles.active=e2e -jar ./artifact/admin-backend.jar &
cd frontend/src/main/webapp
npm run cy:run-ci
- uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-results
path: |
./frontend/src/main/webapp/cypress/screenshots/
./frontend/src/main/webapp/cypress/videos/
retention-days: 1