Skip to content

Update maven.yml

Update maven.yml #13

Workflow file for this run

# GitHub Actions Workflow for Gauge Selenium Java Web UI Automation
# This GitHub Actions workflow is designed to build a Maven project and execute Gauge Selenium tests using the Chrome browser.
# The automation project utilizes Gauge, Selenium, 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: Gauge Selenium Java Web UI Automation CI
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
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
- name: Set up Chrome browser
uses: browser-actions/setup-chrome@latest
with:
chrome-version: 'latest'
- name: Install Gauge using CURL
run: npm install -g @getgauge/cli
- name: Install Gauge-Java plugin
run: gauge install java --version 0.7.4
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Check build environment
run: |
echo "Java version:"
java -version
echo "Maven version:"
mvn -version
echo "Chrome version:"
google-chrome --version
echo "Gauge version:"
gauge -v
- name: Execute regression test suite
run: mvn test-compile gauge:execute -DspecsDir="specs" -Denv="dev"
- name: Archive test reports
if: always()
uses: actions/upload-artifact@v3
with:
name: test-reports
path: reports