Skip to content

CHARMS - FANCONI STUDY SMOKE TESTS #183

CHARMS - FANCONI STUDY SMOKE TESTS

CHARMS - FANCONI STUDY SMOKE TESTS #183

name: CHARMS-FANCONI-REGRESSION
on:
schedule:
# This corresponds to 7:30 AM EST (12:30 PM UTC) from Monday to Friday
- cron: '30 12 * * 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="ServiceNow.CHARMS.Runners.Run_CHARMS_Fanconi_Regression_Test" test
continue-on-error: true
- name: Generate timestamp
id: timestamp
run: |
$timeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById("Eastern Standard Time")
$dateTime = [System.TimeZoneInfo]::ConvertTime([System.DateTime]::UtcNow, $timeZone)
$timestamp = $dateTime.ToString("yyyy-MM-dd_hh-mm-ss_tt")
Add-Content -Path $env:GITHUB_ENV -Value "timestamp=$timestamp"
- name: Determine report path
id: reportpath
run: echo "path=fanconi-smoke-reports" >> $GITHUB_ENV
- name: Upload Cucumber Report
uses: actions/upload-artifact@v4
if: always()
with:
name: CHARMS-FANCONI-REGRESSION-${{ env.timestamp }}
path: target/fanconi-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/fanconi-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 "fanconi-smoke-report.html" ]]; then
# sed -i '1s/.*/<h1>CHARMS FANCONI Test Results<\/h1>/' fanconi-smoke-report.html
# echo "<h3><a href='${{ env.path }}/report-${{ env.timestamp }}.html'>Test Report ${{ env.path }}/report-${{ env.timestamp }}.html</a></h3>" >> fanconi-smoke-report.html
# git add charms-fanconi-test-results.html
# git commit -m "Update charms-fanconi-test-results.html"
# else
# echo "<h1>CHARMS FANCONI Test Results</h1>" > charms-fanconi-test-results.html
# echo "<h3><a href='${{ env.path }}/report-${{ env.timestamp }}.html'>Test Report ${{ env.path }}/report-${{ env.timestamp }}.html</a></h3>" >> fanconi-smoke-report.html
# git add charms-fanconi-test-results.html
# git commit -m "Create and update fanconi-smoke-report.html"
# fi
# git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages