Run the automation batch #7
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: Run the automation batch | |
on: workflow_dispatch | |
jobs: | |
build: | |
name: run-workflow | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Cache Maven dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven | |
- name: Authenticate to GitHub Packages | |
run: | | |
echo "<settings><servers><server><id>github</id><username>${{ github.actor }}</username><password>${{ secrets.GITHUB_TOKEN }}</password></server></servers></settings>" > ~/.m2/settings.xml | |
- name: Run Rest Assured Test Cases | |
run: mvn clean test | |
- name: Archive TestNG Reports | |
if: always() # This ensures the step runs even if the tests fail | |
uses: actions/upload-artifact@v3 | |
with: | |
name: extent-reports | |
path: ./extent.reports/ # Update this path if your reports are stored elsewhere |