diff --git a/.github/workflows/CHARMS-FANCONI-Smoke.yml b/.github/workflows/CHARMS-FANCONI-Smoke.yml index 6964e7e33..a50710b94 100644 --- a/.github/workflows/CHARMS-FANCONI-Smoke.yml +++ b/.github/workflows/CHARMS-FANCONI-Smoke.yml @@ -1,94 +1,72 @@ name: CHARMS - FANCONI STUDY SMOKE TESTS on: - schedule: - - cron: '30 12 * * *' workflow_dispatch: - inputs: - testBrowser: - description: 'Browser' - required: true - default: 'chrome' + schedule: + - cron: '15 13 * * 1-6' # 8:15 AM EST (1:15 PM UTC) Monday to Saturday jobs: build: - runs-on: ubuntu-latest - env: - DISPLAY: ".99" - SCREEN_RESOLUTION: "1280x1024x24" + runs-on: NCI-WINDOWS steps: - uses: actions/checkout@v2 with: ref: ${{ github.ref }} fetch-depth: 0 - - name: Set up JDK 1.11 - uses: actions/setup-java@v1 - with: - java-version: 1.11 - - name: Install Google Chrome - run: | - sudo apt-get install -y wget - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - sudo apt-get install -y ./google-chrome-stable_current_amd64.deb - - name: Check and remove Chromedriver if exists - run: | - if type chromedriver >/dev/null 2>&1; then - echo "Chromedriver found, removing..." - sudo rm -f $(which chromedriver) - else - echo "Chromedriver not found, proceeding..." - fi - - name: Replace variables in cloudEnv.properties - run: | - sed -i "s/SIDE_DOOR_USERNAME/${{ secrets.SIDEDOORUSERNAME }}/g" src/main/resources/conf/cloudEnv.properties - sed -i "s/SIDE_DOOR_PASSWORD/${{ secrets.SIDEDOORPASSWORD }}/g" src/main/resources/conf/cloudEnv.properties - if [ "${{ github.event_name }}" = "schedule" ]; then - sed -i "s/BROWSER_VAR/chrome/g" src/main/resources/conf/cloudEnv.properties - else - sed -i "s/BROWSER_VAR/${{ github.event.inputs.testBrowser }}/g" src/main/resources/conf/cloudEnv.properties - fi - sed -i "s/ENV_VAR/test/g" src/main/resources/conf/cloudEnv.properties + - name: Run specific runner class - run: mvn -B -q -Dtest=Run_CHARMS_Fanconi_Smoke_Test -DisCloud=true test + shell: cmd + run: mvn -B -q -Dtest=Run_CHARMS_Fanconi_Smoke_Test test continue-on-error: true + - name: Generate timestamp id: timestamp - run: echo "::set-output name=timestamp::$(TZ='America/New_York' date +'%Y-%m-%d_%I-%M-%S_%p')" + 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 }} + name: cucumber-report-${{ github.run_number }}-${{ steps.timestamp.outputs.timestamp }} path: target/fanconi-smoke-reports/* - - name: Remove Google Chrome installation file - run: rm google-chrome-stable_current_amd64.deb + - name: Push HTML Report + shell: bash env: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | - git config --global user.email "diegojuarezbusiness@gmail.com" + git config --global user.email "dsjnih@gmail.com" git config --global user.name "iamdez99" git stash git fetch git checkout gh-pages - git rm -f src/main/resources/conf/cloudEnv.properties - git checkout stash -- . - mkdir -p ${{ steps.reportpath.outputs.path }} - mv target/fanconi-smoke-reports/*.html ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html + 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 }}" + 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 - echo '

CHARMS - FANCONI Study Smoke Test Results

' > fanconi-smoke-test-results.html + if [[ -f "fanconi-smoke-test-results.html" ]]; then + sed -i 's/

.*<\/h1>/

CHARMS - FANCONI Study Smoke Test Results<\/h1>/' fanconi-smoke-test-results.html + echo "

Test Report fanconi-smoke-reports/report-${{ steps.timestamp.outputs.timestamp }}.html

" >> fanconi-smoke-test-results.html + git add fanconi-smoke-test-results.html + git commit -m "Update fanconi-smoke-test-results.html" + else + echo "

CHARMS - FANCONI Study Smoke Test Results

" > fanconi-smoke-test-results.html + echo "

Test Report fanconi-smoke-reports/report-${{ steps.timestamp.outputs.timestamp }}.html

" >> fanconi-smoke-test-results.html + git add fanconi-smoke-test-results.html + git commit -m "Create and update fanconi-smoke-test-results.html" fi - echo "

Test Report ${{ steps.reportpath.outputs.path }}/report-${{ steps.timestamp.outputs.timestamp }}.html

" >> fanconi-smoke-test-results.html - git add fanconi-smoke-test-results.html - git commit -m "Update fanconi-smoke-test-results.html" git push https://${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages \ No newline at end of file diff --git a/.github/workflows/CHARMS-RAS-Regression.yml b/.github/workflows/CHARMS-RAS-Regression.yml index 97ca80d95..28cd3d76e 100644 --- a/.github/workflows/CHARMS-RAS-Regression.yml +++ b/.github/workflows/CHARMS-RAS-Regression.yml @@ -21,15 +21,18 @@ jobs: fetch-depth: 0 - name: Run specific runner class + shell: cmd run: mvn -B -q -Dtest=ServiceNow.CHARMS.Runners.Run_CHARMS_RAS_Regression_Test test continue-on-error: true - name: Generate timestamp id: timestamp + shell: cmd run: echo "timestamp=$(TZ='America/New_York' date +'%Y-%m-%d_%I-%M-%S_%p')" >> $GITHUB_ENV - name: Determine report path id: reportpath + shell: cmd run: echo "path=html-charms-rasopathy-regression-reports" >> $GITHUB_ENV - name: Upload Cucumber Report @@ -40,6 +43,7 @@ jobs: path: target/html-charms-rasopathy-regression-reports/* - name: Push HTML Report + shell: bash env: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | @@ -56,6 +60,7 @@ jobs: 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: | diff --git a/.github/workflows/NERD-Regression.yml b/.github/workflows/NERD-Regression.yml index 1b23f2cd5..66910d368 100644 --- a/.github/workflows/NERD-Regression.yml +++ b/.github/workflows/NERD-Regression.yml @@ -21,15 +21,18 @@ jobs: fetch-depth: 0 - name: Run specific runner class + shell: cmd run: mvn -B -q -Dtest=Run_NERD_Regression_Test test continue-on-error: true - name: Generate timestamp id: timestamp + shell: cmd run: echo "timestamp=$(TZ='America/New_York' date +'%Y-%m-%d_%I-%M-%S_%p')" >> $GITHUB_ENV - name: Determine report path id: reportpath + shell: cmd run: echo "path=nerd-regression-reports" >> $GITHUB_ENV - name: Upload Cucumber Report @@ -40,6 +43,7 @@ jobs: path: target/nerd-regression-reports/* - name: Push HTML Report + shell: bash env: GH_TOKEN: ${{ secrets.GH_TOKEN }} run: | @@ -56,6 +60,7 @@ jobs: 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: | diff --git a/.github/workflows/NIFE-Regression.yml b/.github/workflows/NIFE-Regression.yml new file mode 100644 index 000000000..0c3b6b330 --- /dev/null +++ b/.github/workflows/NIFE-Regression.yml @@ -0,0 +1,37 @@ +name: PLATFORM BUSINESS - NIFE REGRESSION TESTS + +on: + workflow_dispatch: + schedule: + - cron: '15 12 * * 1-5' # 7:15 AM EST (12:15 PM UTC) Monday to Friday + +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=AnalysisTools.NIFESubmit.NIFESubmit_Runners.RunNIFESubmitRegressionTest 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::NIFE-Regression-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/NIFE-Regression-reports/* \ No newline at end of file diff --git a/.github/workflows/SOCCER-Regression.yml b/.github/workflows/SOCCER-Regression.yml new file mode 100644 index 000000000..f2f9ab69a --- /dev/null +++ b/.github/workflows/SOCCER-Regression.yml @@ -0,0 +1,37 @@ +name: PLATFORM BUSINESS - SOCCER REGRESSION TESTS + +on: + workflow_dispatch: + schedule: + - cron: '30 12 * * 1-5' # 7:30 AM EST (12:30 PM UTC) Monday to Friday + +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=AnalysisTools.Soccer.Soccer_Runners.RunSoccerRegressionTest 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::soccer-regression-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/soccer-regression-reports/* \ No newline at end of file diff --git a/.github/workflows/SSJ-Regression.yml b/.github/workflows/SSJ-Regression.yml index ed035e3a2..bb994bfc2 100644 --- a/.github/workflows/SSJ-Regression.yml +++ b/.github/workflows/SSJ-Regression.yml @@ -2,6 +2,8 @@ name: PLATFORM BUSINESS - SSJ REGRESSION TESTS on: workflow_dispatch: + schedule: + - cron: '45 12 * * 1-6' # 7:45 AM EST (12:45 PM UTC) Monday to Saturday jobs: build: @@ -31,7 +33,7 @@ jobs: uses: actions/upload-artifact@v3 if: always() with: - name: cucumber-report-${{ github.run_number }} + name: cucumber-report-${{ github.run_number }}-${{ steps.timestamp.outputs.timestamp }} path: target/ssj-regression-reports/* - name: Push HTML Report @@ -48,7 +50,7 @@ jobs: mkdir -p ssj-regression-reports mv target/ssj-regression-reports/*.html ssj-regression-reports/report-${{ steps.timestamp.outputs.timestamp }}.html git add . - git commit -m "Publishing cucumber report ${{ github.run_number }}" + 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 diff --git a/src/test/java/AnalysisTools/NIFESubmit/NIFESubmit_Runners/RunNIFESubmitRegressionTest.java b/src/test/java/AnalysisTools/NIFESubmit/NIFESubmit_Runners/RunNIFESubmitRegressionTest.java index 8c17bff82..b6e78d168 100644 --- a/src/test/java/AnalysisTools/NIFESubmit/NIFESubmit_Runners/RunNIFESubmitRegressionTest.java +++ b/src/test/java/AnalysisTools/NIFESubmit/NIFESubmit_Runners/RunNIFESubmitRegressionTest.java @@ -3,7 +3,7 @@ import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; -@CucumberOptions(plugin ={"html:target/html-reports/cucumber-default-report.html" +@CucumberOptions(plugin ={"html:target/NIFE-Regression-reports/NIFE-regression-report.html" , "json:target/cucumber.json" , "rerun:target/failed.txt" , "pretty"} diff --git a/src/test/java/AnalysisTools/Soccer/Soccer_Runners/RunSoccerRegressionTest.java b/src/test/java/AnalysisTools/Soccer/Soccer_Runners/RunSoccerRegressionTest.java index 5d4885292..c1298331a 100644 --- a/src/test/java/AnalysisTools/Soccer/Soccer_Runners/RunSoccerRegressionTest.java +++ b/src/test/java/AnalysisTools/Soccer/Soccer_Runners/RunSoccerRegressionTest.java @@ -3,7 +3,7 @@ import io.cucumber.testng.AbstractTestNGCucumberTests; import io.cucumber.testng.CucumberOptions; -@CucumberOptions(plugin ={"html:target/html-reports/cucumber-default-report.html" +@CucumberOptions(plugin ={"html:target/soccer-regression-reports/soccer-regression-report.html" , "json:target/cucumber.json" , "rerun:target/failed.txt" , "pretty"} diff --git a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/OWM_Vacancy_Manager_StepsImpl.java b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/OWM_Vacancy_Manager_StepsImpl.java index a983edb4c..62d259959 100644 --- a/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/OWM_Vacancy_Manager_StepsImpl.java +++ b/src/test/java/ServiceNow/PlatformBusinessApps/SSJ/playwright/StepsImplementation/OWM_Vacancy_Manager_StepsImpl.java @@ -725,6 +725,5 @@ public static void verifies_vacancy_title_is_on_the_your_vacancies_page(String v itemPage.click(); } } - } } \ No newline at end of file