Skip to content

Update JavaCIwithMaven.yml #3

Update JavaCIwithMaven.yml

Update JavaCIwithMaven.yml #3

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: JavaCIwithMaven
#Run build within each push of code to master branch
on: [push]
#branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 20
uses: actions/setup-java@v3
with:
java-version: '20'
distribution: 'zulu'
cache: maven
# - name: Update snapshots phase
# run: mvn --batch-mode --update-snapshots verify
- name: Install dependencies
run: mvn verify -B --file pom.xml
#Dependencies
#- name: Install dependencies
# run: mvn test -B -e package --file pom.xml
#Verify and run tests
- name: Verify and run
run: mvn test verify -Dcucumber.options="--tags @Test"
#Run test
#- name: Run E2E Tests
# run: mvn -q -B test -Dgroups="EndToEndTests"
#- name: Run restAssured swapi
# run: mvn -q -B test -Dgroups="restAssuredSwapi"