PLATFORM BUSINESS - OBF SMOKE TESTS #141
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
name: PLATFORM BUSINESS - OBF SMOKE TESTS | |
on: | |
schedule: | |
# This corresponds to 9:00 AM EST (2:00 PM UTC) from Monday to Friday | |
- cron: '0 14 * * MON-FRI' | |
workflow_dispatch: | |
inputs: | |
testBrowser: | |
description: 'Browser' | |
required: true | |
default: 'chrome' | |
jobs: | |
build: | |
runs-on: NCI-WINDOWS | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
fetch-depth: 0 | |
- name: Run specific runner class | |
run: mvn -B -q -Dtest=Run_OBF_Smoke_Test -DisCloud=true test | |
continue-on-error: true | |
- name: Generate timestamp | |
id: timestamp | |
run: echo "timestamp=$(TZ='America/New_York' date +'%Y-%m-%d_%I-%M-%S_%p')" >> $GITHUB_ENV | |
- name: Determine report path | |
id: reportpath | |
run: echo "path=obf-smoke-reports" >> $GITHUB_ENV | |
- name: Upload Cucumber Report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: cucumber-report-${{ env.timestamp }} | |
path: target/obf-smoke-reports/* | |
- name: Push HTML Report | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "iamdez99" | |
git stash | |
git fetch | |
git checkout gh-pages | |
git checkout stash -- . | |
mkdir -p ${{ env.path }} | |
mv target/obf-smoke-reports/*.html ${{ env.path }}/report-${{ env.timestamp }}.html | |
git add . | |
git commit -m "Publishing cucumber report ${{ env.timestamp }}" | |
git push -f https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages | |
- name: Update Test Results and Append to Index File | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
if [ ! -f obf-smoke-test-results.html ]; then | |
echo '<h1>OBF Smoke Test Results</h1>' > obf-smoke-test-results.html | |
fi | |
echo "<h3><a href='${{ env.path }}/report-${{ env.timestamp }}.html'>Test Report ${{ env.path }}/report-${{ env.timestamp }}.html</a></h3>" >> obf-smoke-test-results.html | |
git add obf-smoke-test-results.html | |
git commit -m "Update obf-smoke-test-results.html" | |
git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages |