forked from Fluffy777/universe
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (56 loc) · 1.81 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
name: E2E Tests
on:
push:
branches:
- units_piatachenko
pull_request:
branches:
- sumdu.edu.ua
- units_piatachenko
jobs:
e2e-tests:
runs-on: windows-latest # Use Windows environment
steps:
# Step 1: Checkout the code
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Set up Java 19
- name: Set up Java 19
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '19'
# Step 3: Install dependencies without running tests
- name: Install dependencies without tests
run: mvn install -DskipTests
# Step 4: Start the Javalin application with the properties file
- name: Start Javalin Application
run: |
java -cp target/classes com.fluffy.universe.Main --config=${{ github.workspace }}\application.properties &
# Step 5: Wait for the application to start
- name: Wait for the application to start
run: Start-Sleep -Seconds 30
# Step 6: Run Cucumber + Selenium tests
- name: Run Cucumber + Selenium tests
run: mvn test
# Additional steps for Robot Framework tests
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Robot Framework and dependencies
run: |
pip install robotframework
pip install robotframework-seleniumlibrary
pip install -r requirements.txt
- name: Run Robot Framework E2E tests
run: |
robot --outputdir results e2e_tests/
# Step finale: Archive test results
- name: Archive test results
uses: actions/upload-artifact@v3
with:
name: test-results
path: |
target/surefire-reports
results/