Skip to content

visual proof and uncommented tests #45

visual proof and uncommented tests

visual proof and uncommented tests #45

Workflow file for this run

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: Package the JAR
- name: Package the JAR
run: mvn clean package -DskipTests
# 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/