-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ea7176
commit bfc3994
Showing
1 changed file
with
63 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,75 @@ | ||
# This workflow will build a Java project with Maven | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
# GitHub Actions Workflow for Gauge Selenium Java Web UI Automation | ||
|
||
name: Gauge Java CI with Maven | ||
# 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: [ master ] | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: [ master ] | ||
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: curl -SsL https://downloads.gauge.org/stable | sh | ||
|
||
- name: Install Gauge-Java plugin | ||
run: gauge install java --version 0.7.4 | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Add Gauge's GPG key | ||
run: sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-keys 023EDB0B | ||
- name: Add Gauge to the repository list | ||
run: echo deb https://dl.bintray.com/gauge/gauge-deb stable main | sudo tee -a /etc/apt/sources.list | ||
- name: Install Gauge | ||
run: sudo apt-get update && sudo apt-get install gauge | ||
- name: Install Gauge-Java plugin | ||
run: gauge install java --version 0.7.4 | ||
- name: Build Test with Maven | ||
run: mvn test-compile gauge:execute -DspecsDir="specs" -Denv="dev" | ||
- 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 | ||
- 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 |