Update README.md #26
This file contains hidden or 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: selenium_test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| contents: write | |
| jobs: | |
| selenium_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: Cache Maven repository | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-maven- | |
| - name: Install Chrome | |
| uses: browser-actions/setup-chrome@latest | |
| - name: Run Maven tests | |
| run: mvn clean test | |
| continue-on-error: true | |
| - name: Upload Surefire Reports (for debugging) | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: surefire-reports | |
| path: target/surefire-reports | |
| - name: Get Allure history | |
| uses: actions/checkout@v3 | |
| if: always() | |
| continue-on-error: true | |
| with: | |
| ref: gh-pages | |
| path: gh-pages | |
| - name: Generate Allure Report | |
| run: mvn allure:report | |
| - name: Allure Report action from marketplace | |
| uses: simple-elf/allure-report-action@master | |
| if: always() | |
| with: | |
| allure_results: target/allure-results | |
| allure_history: allure-history | |
| - name: Deploy report to Github Pages | |
| if: always() | |
| uses: peaceiris/actions-gh-pages@v2 | |
| env: | |
| PERSONAL_TOKEN: ${{ secrets.EPOLIF_TOKEN }} | |
| PUBLISH_BRANCH: gh-pages | |
| PUBLISH_DIR: allure-history |