Skip to content

CHARMS - FANCONI STUDY SMOKE TESTS #153

CHARMS - FANCONI STUDY SMOKE TESTS

CHARMS - FANCONI STUDY SMOKE TESTS #153

name: CHARMS - FANCONI STUDY SMOKE TESTS
on:
workflow_dispatch:
schedule:
- cron: '15 13 * * 1-6' # 8:15 AM EST (1:15 PM UTC) Monday to Saturday
jobs:
build:
runs-on: NCI-WINDOWS
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Run specific runner class
shell: cmd
run: mvn -B -q -Dtest=Run_CHARMS_Fanconi_Smoke_Test test
continue-on-error: true
- name: Generate timestamp
id: timestamp
shell: cmd
run: echo "::set-output name=timestamp::%date:~-4,4%-%date:~-10,2%-%date:~-7,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%"
- name: Determine report path
id: reportpath
shell: cmd
run: echo "::set-output name=path::fanconi-smoke-reports"
- name: Upload Cucumber Report
uses: actions/upload-artifact@v3
if: always()
with:
name: cucumber-report-${{ github.run_number }}-${{ steps.timestamp.outputs.timestamp }}
path: target/fanconi-smoke-reports/*
# - name: Push HTML Report
# shell: bash
# 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 stash pop
# mkdir -p fanconi-smoke-reports
# mv target/fanconi-smoke-reports/*.html fanconi-smoke-reports/report-${{ steps.timestamp.outputs.timestamp }}.html
# git add .
# git commit -m "Publishing cucumber report ${{ github.run_number }} on ${{ steps.timestamp.outputs.timestamp }}"
# git push -f https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages
#
# - name: Update Test Results and Append to Index File
# shell: bash
# env:
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
# run: |
# if [[ -f "fanconi-smoke-test-results.html" ]]; then
# sed -i 's/<h1>.*<\/h1>/<h1>CHARMS - FANCONI Study Smoke Test Results<\/h1>/' fanconi-smoke-test-results.html
# echo "<h3><a href='fanconi-smoke-reports/report-${{ steps.timestamp.outputs.timestamp }}.html'>Test Report fanconi-smoke-reports/report-${{ steps.timestamp.outputs.timestamp }}.html</a></h3>" >> fanconi-smoke-test-results.html
# git add fanconi-smoke-test-results.html
# git commit -m "Update fanconi-smoke-test-results.html"
# else
# echo "<h1>CHARMS - FANCONI Study Smoke Test Results</h1>" > fanconi-smoke-test-results.html
# echo "<h3><a href='fanconi-smoke-reports/report-${{ steps.timestamp.outputs.timestamp }}.html'>Test Report fanconi-smoke-reports/report-${{ steps.timestamp.outputs.timestamp }}.html</a></h3>" >> fanconi-smoke-test-results.html
# git add fanconi-smoke-test-results.html
# git commit -m "Create and update fanconi-smoke-test-results.html"
# fi
# git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages