all_Automation_Git_Actions #43
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: Java CI with Maven and TestNG | |
# on: | |
# push: | |
# branches: | |
# - all_Automation_Actions | |
# # pull_request: | |
# # branches: | |
# # - main | |
# jobs: | |
# build: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout code | |
# uses: actions/[email protected] | |
# - name: Set up JDK 17 | |
# uses: actions/setup-java@v2 | |
# with: | |
# java-version: '17' | |
# # - name: Build with Maven | |
# # run: mvn clean install | |
# - name: Run TestNG tests | |
# run: mvn test -DsuiteXmlFile=testng.xml | |
# # -name: Run tests | |
# # run: mvn test | |
# name: Java CI with Maven and TestNG | |
# on: | |
# push: | |
# branches: | |
# - all_Automation_Actions | |
# # pull_request: | |
# # branches: | |
# # - main | |
# jobs: | |
# build: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v3 | |
# - name: Set up JDK 17 | |
# uses: actions/setup-java@v2 | |
# with: | |
# distribution: 'temurin' # Can be 'adopt', 'zulu', etc. | |
# java-version: '17' | |
# - name: Build with Maven | |
# run: mvn clean install | |
# working-directory: all-learner-ai-app/allAutomation # Adjust this path as needed | |
# - name: Run TestNG tests | |
# run: mvn test -DsuiteXmlFile=testng.xml | |
# working-directory: all-learner-ai-app/allAutomation # Adjust this path as needed | |
# name: Java CI with Maven and TestNG | |
# on: | |
# push: | |
# branches: | |
# - all_Automation_Actions | |
# pull_request: | |
# branches: | |
# - main | |
# jobs: | |
# build: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v3 | |
# - name: Cache Maven packages | |
# uses: actions/cache@v3 | |
# with: | |
# path: ~/.m2/repository | |
# key: ${{ runner.os }}-maven-${{ hashFiles('all-learner-ai-app/allAutomation/pom.xml') }} | |
# restore-keys: | | |
# ${{ runner.os }}-maven- | |
# - name: Set up JDK 17 | |
# uses: actions/setup-java@v2 | |
# with: | |
# distribution: 'temurin' # Can be 'adopt', 'zulu', etc. | |
# java-version: '17' | |
# - name: Build with Maven | |
# run: mvn clean install | |
# # working-directory: all-learner-ai-app\allAutomation | |
# - name: Run TestNG tests | |
# run: mvn test -DsuiteXmlFile=testng.xml | |
# # working-directory: all-learner-ai-app\allAutomation | |
name: Java CI with Maven | |
on: | |
push: | |
branches: all_Automation_Actions | |
pull_request: | |
branches: all_Automation_Actions | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('/home/runner/work/all-learner-ai-app/all-learner-ai-app/allAutomation/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Install dependencies | |
run: | | |
cd /home/runner/work/all-learner-ai-app/all-learner-ai-app/allAutomation | |
mvn install -DskipTests | |
- name: Run tests | |
run: | | |
cd /home/runner/work/all-learner-ai-app/all-learner-ai-app/allAutomation | |
mvn test | |