From dc11073aaefbf6088c6f9c99423c4c0389cfc72c Mon Sep 17 00:00:00 2001 From: Anthony Lombardo Date: Mon, 14 Aug 2023 11:03:01 -0400 Subject: [PATCH] Upgrade support for Java 11 --- .../{maven.yml => ci-pull-request.yml} | 4 +- .github/workflows/run-smoke-tests.yml | 73 +++++++++++++++++++ 2 files changed, 75 insertions(+), 2 deletions(-) rename .github/workflows/{maven.yml => ci-pull-request.yml} (95%) create mode 100644 .github/workflows/run-smoke-tests.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/ci-pull-request.yml similarity index 95% rename from .github/workflows/maven.yml rename to .github/workflows/ci-pull-request.yml index adc3c1e..f7367e0 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/ci-pull-request.yml @@ -21,10 +21,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 8 + - name: Set up JDK 11 uses: actions/setup-java@v3 with: - java-version: '8' + java-version: '11' distribution: 'temurin' cache: maven - name: Build with Maven diff --git a/.github/workflows/run-smoke-tests.yml b/.github/workflows/run-smoke-tests.yml new file mode 100644 index 0000000..47d4d19 --- /dev/null +++ b/.github/workflows/run-smoke-tests.yml @@ -0,0 +1,73 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Run Web Smoke Tests + +on: + workflow_dispatch: + inputs: + environment: + type: choice + description: Select an Environment? + options: + - test + - stage + - prod + color: + type: choice + description: Select a Color? + options: + - yellow + - green + - blue + +jobs: + + run: + name: run + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + - name: Start Selenoid Server + uses: Xotabu4/selenoid-github-action@v2 + + - name: Run Tests + run: mvn -B clean install -Psmoke-web -Dcolor=${{github.event.inputs.color}} -Dtest.env=${{github.event.inputs.environment}} -Drunners=5 -Dskip-profile=true + + - name: Get Allure history + uses: actions/checkout@v2 + if: always() + continue-on-error: true + with: + ref: gh-pages + path: gh-pages + + - name: Allure Report action from marketplace + uses: simple-elf/allure-report-action@master + if: always() + id: allure-report + with: + allure_results: target/allure-results + gh_pages: gh-pages + allure_report: allure-report + allure_history: allure-history + + - name: Deploy report to Github Pages + if: always() + uses: peaceiris/actions-gh-pages@v2 + env: + PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_BRANCH: gh-pages + PUBLISH_DIR: allure-history \ No newline at end of file