Update README.md #12
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
# GitHub Actions Workflow for Rest Assured Java API Automation | |
# This GitHub Actions workflow is designed to build a Maven project and execute Rest Assured API tests. | |
# The automation project utilizes TestNG, Rest Assured, Maven, and Java as its core technologies. | |
# For more details on building and testing Java projects with Maven using GitHub Actions, please refer to the official documentation: | |
# https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Rest Assured Java API Automation CI | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
- name: Set up Maven 3.6.3 | |
run: | | |
wget -q https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz | |
tar -xzf apache-maven-3.6.3-bin.tar.gz | |
export PATH=$(pwd)/apache-maven-3.6.3/bin:$PATH | |
test: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check build environment | |
run: | | |
echo "Java version:" | |
java -version | |
echo "Maven version:" | |
mvn -version | |
- name: Execute regression test suite | |
run: mvn clean test -Pqa,smoke-test | |
- name: Archive logs | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs | |
path: logs | |
- name: Archive test reports | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-reports | |
path: reports |