diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 37764ba..b8690d0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,3 +1,55 @@ +# +#name: Selenium TestNG CI +# +#on: +# push: +# branches: +# - main +# pull_request: +# branches: +# - main +# +#jobs: +# build: +# runs-on: ubuntu-latest +# +# steps: +# # Step 1: Checkout the code +# - name: Checkout repository +# uses: actions/checkout@v2 +# +# # Step 2: Set up Java environment +# - name: Set up JDK 11 +# uses: actions/setup-java@v2 +# with: +# distribution: 'adopt' +# java-version: '11' +# +# # Step 3: Cache Maven dependencies for faster builds +# - name: Cache Maven dependencies +# uses: actions/cache@v2 +# with: +# path: ~/.m2 +# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} +# restore-keys: | +# ${{ runner.os }}-maven- +# +# # Step 4: Install Maven dependencies +# - name: Install dependencies +# run: mvn install -DskipTests +# +# # Step 5: Run TestNG tests +# - name: Run TestNG tests +# run: mvn test +# +# # Step 6: Generate Extent Reports (optional) +# - name: Upload TestNG Extent Reports +# uses: actions/upload-artifact@v2 +# with: +# name: extent-reports +# path: target/extent-reports/ # Adjust this path to your reports folder + + name: Selenium TestNG CI @@ -42,9 +94,9 @@ jobs: - name: Run TestNG tests run: mvn test - # Step 6: Generate Extent Reports (optional) + # Step 6: Upload Extent Reports (updated to use v3) - name: Upload TestNG Extent Reports - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: extent-reports path: target/extent-reports/ # Adjust this path to your reports folder