Skip to content

Added testcases and made few changes #36

Added testcases and made few changes

Added testcases and made few changes #36

Workflow file for this run

name: Test Workflow
on:
push:
branches:
- develop
pull_request:
branches:
- develop
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_INCOMING_WEBHOOK }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
java-package: 'jdk'
architecture: 'x64'
check-latest: false
server-id: 'github'
server-username: ${{ github.actor }}
server-password: ${{ github.token }}
overwrite-settings: true
job-status: 'success'
- name: Cache Maven dependencies
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up WireGuard # Setting up the Wiregaurd to access the openg2p url's
run: |
sudo apt-get update
sudo apt-get install -y wireguard
sudo cp scripts/openg2p-e2e.conf /etc/wireguard/
sudo systemctl start wg-quick@openg2p-e2e.service
- name: Chrome setup
uses: browser-actions/setup-chrome@v1
- run: chrome --version
- uses: actions/checkout@v2
- name: Chromedriver setup
uses: nanasess/setup-chromedriver@v2
- run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- name: Build with Maven
run: mvn clean install -DskipTests=true
- name: Run Sanity tests
run: mvn clean test
- name: Slack Notification
uses: act10ns/slack@v1
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
channel: 'openg2p-notifications'
if: always()
- name: Install Allure
run: |
sudo apt-get install default-jre
wget https://github.com/allure-framework/allure2/releases/download/2.18.1/allure_2.18.1-1_all.deb
sudo dpkg -i allure_2.18.1-1_all.deb
- name: Generate Allure Report
run: |
allure generate --clean
- name: Deploy to GitHub Pages
if: always()
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GIT_TOKEN }}
publish_dir: allure-report