-
Notifications
You must be signed in to change notification settings - Fork 7
99 lines (83 loc) · 2.46 KB
/
Copy pathtests.yml
File metadata and controls
99 lines (83 loc) · 2.46 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
name: Tests
on:
pull_request:
push:
branches: [main]
concurrency:
group: tests-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-tests:
name: Unit & Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- uses: gradle/actions/setup-gradle@v4
- name: Run tests
run: ./gradlew test
- name: Upload test report
if: failure()
uses: actions/upload-artifact@v4
with:
name: gradle-test-report
path: build/reports/tests/test/
playwright-tests:
name: Playwright E2E Tests
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:12.2
env:
MARIADB_DATABASE: springuser
MARIADB_USER: springuser
MARIADB_PASSWORD: springuser
MARIADB_ROOT_PASSWORD: rootpassword
ports:
- 3306:3306
options: >-
--health-cmd="healthcheck.sh --connect --innodb_initialized"
--health-interval=10s
--health-timeout=5s
--health-retries=5
env:
# The MariaDB service container replaces Spring Boot's Docker Compose integration
SPRING_DOCKER_COMPOSE_ENABLED: "false"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- uses: gradle/actions/setup-gradle@v4
- name: Build application
run: ./gradlew assemble
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: playwright/package-lock.json
- name: Install Playwright dependencies
working-directory: playwright
run: |
npm ci
npx playwright install --with-deps chromium
- name: Run E2E tests (MFA disabled)
working-directory: playwright
env:
APP_PROFILES: playwright-test
run: npx playwright test --project=chromium
- name: Run E2E tests (MFA enabled)
working-directory: playwright
env:
APP_PROFILES: playwright-test,mfa
run: npx playwright test --project=chromium-mfa
- name: Upload Playwright report
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright/reports/