Skip to content

Merge pull request #143 from govuk-one-login/LIME-843 #6

Merge pull request #143 from govuk-one-login/LIME-843

Merge pull request #143 from govuk-one-login/LIME-843 #6

name: Smoke Test against Build
on:
schedule:
# Every weekday at 5am
- cron: "0 5 * * 1-5"
push:
jobs:
smoke:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: true
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: zulu
cache: gradle
- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
cache-overwrite-existing: true
- name: Build Cache
uses: actions/cache@v4
with:
path: |
.gradle/
*/build/
*/**/build/
!*/build/reports
!*/build/jacoco
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Run Smoke test against build environment
env:
BROWSER: chrome-headless
ENVIRONMENT: ${{ secrets.TEST_ENVIRONMENT }}
CUCUMBER_PUBLISH_ENABLED: true
coreStubUrl: ${{ secrets.CORE_STUB_URL }}
coreStubUsername: ${{ secrets.CORE_STUB_USERNAME }}
coreStubPassword: ${{ secrets.CORE_STUB_PASSWORD }}
orchestratorStubUrl: ${{ secrets.ORCHESTRATOR_STUB_URL }}
run: cd acceptance-tests && ./gradlew smokeTestBuild
- name: Get test results history
uses: actions/checkout@v4
if: always()
continue-on-error: true
with:
ref: LIME-Cucumber-gh-pages
path: LIME-Cucumber-gh-pages
- name: Cucumber HTML Report action
uses: PavanMudigonda/[email protected]
id: test-report
if: always()
with:
test_results: acceptance-tests/target/cucumber-report
gh_pages: LIME-Cucumber-gh-pages
results_history: acceptance-tests/results-history
- name: Publish Github Pages
if: always() && ${{ github.actor != 'dependabot[bot]' }}
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: LIME-Cucumber-gh-pages
publish_dir: acceptance-tests/results-history
keep_files: true