PLATFORM BUSINESS - OCPL Training Regression #37
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 - OCPL Training Regression | |
on: | |
schedule: | |
# This corresponds to 12:45 PM EST (5:45 PM UTC) from Monday to Friday | |
- cron: '45 17 * * MON-FRI' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: NCI-WINDOWS | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.ref }} | |
fetch-depth: 0 | |
- name: Run OCPL Training Regression Tests | |
shell: cmd | |
run: mvn -B -q -Dtest=ServiceNow.PlatformBusinessApps.OCPL_Training.Runners.Run_OCPL_PW_Regression_Test test | |
continue-on-error: true | |
- name: Generate timestamp | |
id: timestamp | |
shell: powershell | |
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 | |
shell: cmd | |
run: echo "::set-output name=path::OCPL-Training-Regression-reports" | |
- name: Upload Cucumber Report | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: OCPL-Training-Regression-report-${{ env.timestamp }} | |
path: target/OCPL-Training-Regression-reports/* | |
- name: Upload to SharePoint | |
shell: powershell | |
run: | | |
$Env:PATH = "C:\Users\juarezds\AppData\Local\Programs\Python\Python312;$Env:PATH" | |
python $Env:GITHUB_WORKSPACE\.github\scripts\upload_to_sharepoint.py | |
env: | |
FILES_PATH: target/OCPL-Training-Regression-reports/* | |
SHAREPOINT_SITE_ID: ${{ secrets.SHAREPOINT_SITE_ID }} | |
SHAREPOINT_DRIVE_ID: ${{ secrets.SHAREPOINT_DRIVE_ID }} | |
tenant_id: ${{ secrets.SHAREPOINT_TENANT_ID }} | |
client_id: ${{ secrets.SHAREPOINT_CLIENT_ID }} | |
client_secret: ${{ secrets.SHAREPOINT_CLIENT_SECRET }} | |
timestamp: ${{ env.timestamp }} | |
UPLOAD_FOLDER: "Platform Business Applications/TEST AUTOMATION REPORTS/OCPL Training" |