Update e2e.yml #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |