|
| 1 | +--- |
1 | 2 | name: Run Selenium Tests with Allure Reports
|
2 |
| - |
3 | 3 | on:
|
4 | 4 | push:
|
5 | 5 | branches:
|
6 | 6 | - main
|
7 |
| - pull_request: |
8 |
| - |
| 7 | + pull_request: null |
9 | 8 | jobs:
|
10 | 9 | build-and-test:
|
11 | 10 | runs-on: ubuntu-latest
|
12 |
| - |
13 | 11 | steps:
|
14 |
| - # Checkout code |
15 |
| - - name: Checkout code |
16 |
| - uses: actions/checkout@v4 |
17 |
| - |
18 |
| - # Set up JDK |
19 |
| - - name: Set up JDK 20 |
20 |
| - uses: actions/setup-java@v4 |
21 |
| - with: |
22 |
| - java-version: '20' |
23 |
| - distribution: 'temurin' |
24 |
| - |
25 |
| - # Cache Maven dependencies |
26 |
| - - name: Cache Maven dependencies |
27 |
| - uses: actions/cache@v4 |
28 |
| - with: |
29 |
| - path: ~/.m2/repository |
30 |
| - key: ${{ runner.os }}-maven-${{ hashFiles('** /cucumber-archetype-parallel-advance/pom.xml') }} |
31 |
| - restore-keys: | |
32 |
| - ${{ runner.os }}-maven- |
33 |
| -
|
34 |
| - # Execute tests with custom environment variables |
35 |
| - - name: Execute Tests |
36 |
| - working-directory: ./cucumber-archetype-parallel-advance |
37 |
| - run: mvn test -Dcucumber.filter.tags="@Login" |
38 |
| - |
39 |
| - # Debug: Check features directory |
40 |
| - - name: Debug Check Features Directory |
41 |
| - run: | |
42 |
| - ls -R ./cucumber-archetype-parallel-advance/src/test/resources/ |
43 |
| - ls -R ./cucumber-archetype-parallel-advance/src/test/java/ |
44 |
| -
|
45 |
| - # Generate Allure report |
46 |
| - - name: Generate Allure Report |
47 |
| - working-directory: /cucumber-archetype-parallel-advance |
48 |
| - run: mvn io.qameta.allure:allure-maven:2.10.0:report |
49 |
| - |
50 |
| - # Debug: List files in target directory |
51 |
| - - name: Debug List Files in Target Directory |
52 |
| - run: ls -R ./cucumber-archetype-parallel-advance/target/ |
53 |
| - |
54 |
| - # Publish Allure Report |
55 |
| - - name: Publish Allure Report |
56 |
| - uses: actions/upload-artifact@v3 |
57 |
| - with: |
58 |
| - name: allure-report |
59 |
| - path: ./cucumber-archetype-parallel-advance/target/site/allure-report/ |
| 12 | + - name: Checkout code |
| 13 | + uses: actions/checkout@v4 |
| 14 | + - name: Set up JDK 20 |
| 15 | + uses: actions/setup-java@v4 |
| 16 | + with: |
| 17 | + java-version: "20" |
| 18 | + distribution: temurin |
| 19 | + - name: Cache Maven dependencies |
| 20 | + uses: actions/cache@v4 |
| 21 | + with: |
| 22 | + path: ~/.m2/repository |
| 23 | + key: ${{ runner.os }}-maven-${{ hashFiles('** |
| 24 | + /cucumber-archetype-parallel-advance/pom.xml') }} |
| 25 | + restore-keys: | |
| 26 | + ${{ runner.os }}-maven- |
| 27 | + |
| 28 | + - name: Execute Tests |
| 29 | + working-directory: ./cucumber-archetype-parallel-advance |
| 30 | + run: | |
| 31 | + export ENVIRONMENTS=QA |
| 32 | + export PASSWORD=Carolina123. |
| 33 | + export PASSWORD_SUPERADMIN=Carolina123. |
| 34 | + export PLATFORM_GOAL_EXECUTION_TEST=LOCAL |
| 35 | + mvn test -Dcucumber.filter.tags="@ExampleLogin" |
| 36 | + - name: Debug Check Features Directory |
| 37 | + run: | |
| 38 | + ls -R ./cucumber-archetype-parallel-advance/src/test/resources/ |
| 39 | + ls -R ./cucumber-archetype-parallel-advance/src/test/java/ |
| 40 | + - name: Generate Allure Report |
| 41 | + working-directory: ./cucumber-archetype-parallel-advance |
| 42 | + run: mvn io.qameta.allure:allure-maven:2.10.0:report |
| 43 | + - name: Debug List Files in Target Directory |
| 44 | + run: ls -R ./cucumber-archetype-parallel-advance/target/ |
| 45 | + - name: Publish Allure Report |
| 46 | + uses: actions/upload-artifact@v3 |
| 47 | + with: |
| 48 | + name: allure-report |
| 49 | + path: ./cucumber-archetype-parallel-advance/target/site/allure-report/ |
0 commit comments