|
16 | 16 | steps: |
17 | 17 | # Step 1: Check out the repository code |
18 | 18 | - name: Checkout repository |
19 | | - uses: actions/checkout@v4 |
| 19 | + uses: actions/checkout@v3 |
| 20 | + |
| 21 | + - name: Set up Node.js |
| 22 | + uses: actions/setup-node@v3 |
| 23 | + with: |
| 24 | + node-version: '20' |
20 | 25 |
|
21 | 26 | # Step 2: Set up JDK 17 (adjust if you're using a different version) |
22 | 27 | - name: Set up JDK 17 |
|
47 | 52 | restore-keys: | |
48 | 53 | ${{ runner.os }}-maven |
49 | 54 |
|
50 | | - # Step 4: Run Maven to execute Playwright tests |
| 55 | + - name: Install Playwright dependencies |
| 56 | + run: npx playwright install-deps |
| 57 | + |
| 58 | + # Step 6: Run Maven to execute Playwright tests |
51 | 59 | - name: Run Playwright Tests |
52 | 60 | run: mvn verify |
53 | 61 |
|
|
61 | 69 | path: 'target/*.zip' |
62 | 70 |
|
63 | 71 | # Step 8: Deploy Allure report to GitHub Pages |
64 | | -# - name: Deploy Allure Report to GitHub Pages |
65 | | -# if: always() # Ensure this step runs even if tests fail |
66 | | -# uses: peaceiris/actions-gh-pages@v3 |
67 | | -# with: |
68 | | -# github_token: ${{ secrets.GITHUB_TOKEN }} |
69 | | -# publish_dir: target/site/allure-maven-plugin |
70 | | - |
71 | | - # Step 8: Upload Test Results (e.g., HTML reports) |
72 | | - - name: Upload Playwright Test Results |
73 | | - run: | |
74 | | - mkdir -p artifacts |
75 | | - cp -r target/site/allure-maven-plugin/* artifacts/ |
76 | | - if: success() # Run only if the tests pass |
77 | | - continue-on-error: false |
78 | | - # |
79 | | - - name: Deploy to GitHub Pages |
80 | | - uses: actions/deploy-pages@v1 |
| 72 | + - name: Deploy Allure Report to GitHub Pages |
| 73 | + if: always() # Ensure this step runs even if tests fail |
| 74 | + uses: peaceiris/actions-gh-pages@v3 |
81 | 75 | with: |
82 | | - # Optionally customize the directory if needed |
83 | | - folder: artifacts # Deploy the artifacts folder to Pages |
| 76 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 77 | + publish_dir: target/site/allure-maven-plugin |
0 commit comments