forked from Fluffy777/universe
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (54 loc) · 1.67 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
name: E2E Tests
on:
push:
branches:
- units_piatachenko
pull_request:
branches:
- sumdu.edu.ua
- units_piatachenko
jobs:
e2e-tests:
runs-on: ubuntu-latest # Use Linux 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: Clean and Package the JAR
- name: Clean and Package the JAR
run: mvn clean package
# Step 5: Verify JAR file exists
- name: Verify JAR file
run: |
ls -al target/
if [ ! -f target/universe.jar ]; then # Ensure we check for universe.jar
echo "JAR file not found!"
exit 1
fi
# Step 6: Start Javalin Application from the JAR
- name: Start Javalin Application
run: |
java -jar target/universe.jar /home/runner/work/universe/universe/application.properties &
# Step 7: Wait for the application to start
- name: Wait for the application to start
run: sleep 30
# Step 8: Run Cucumber + Selenium tests
- name: Run Cucumber + Selenium tests
run: mvn test
# Step 9: Archive test results
- name: Archive test results
uses: actions/upload-artifact@v3
with:
name: test-results
path: |
target/surefire-reports
results/