Run Keycloak App E2E tests #64
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: Run Keycloak App E2E tests | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 8 * * 3' | |
env: | |
CYPRESS_users: ${{ secrets.CYPRESS_USERS }} | |
CYPRESS_guid: ${{ secrets.CYPRESS_GUID }} | |
CYPRESS_loginproxy: ${{ secrets.CYPRESS_LOGINPROXY }} | |
CYPRESS_siteminder: ${{ secrets.CYPRESS_SITEMINDER }} | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CYPRESS_host: 'https://bcgov.github.io/sso-requests-sandbox/' | |
CYPRESS_smoketest: false | |
CYPRESS_localtest: false | |
CYPRESS_BASE_URL: 'https://bcgov.github.io/sso-requests-sandbox/' | |
jobs: | |
pre-reqs: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false # https://github.com/cypress-io/github-action/issues/48 | |
steps: | |
# Checkout the PR branch | |
- name: Checkout Target Branch | |
uses: actions/checkout@v4 | |
- name: Pre-requisites for test run | |
uses: cypress-io/github-action@v6 | |
id: prereq | |
continue-on-error: false | |
with: | |
summary-title: 'Pre-reqs' | |
wait-on: https://bcgov.github.io/sso-requests-sandbox/ | |
wait-on-timeout: 120 | |
install-command: yarn | |
working-directory: app | |
spec: | | |
cypress/e2e/**/integration-990-deleteAllIntegrations.cy.ts | |
browser: electron | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: app/cypress/screenshots/**/* | |
if-no-files-found: ignore | |
# - uses: actions/upload-artifact@v4 | |
# if: failure() | |
# with: | |
# name: cypress-videos | |
# path: app/cypress/videos/**/* | |
# if-no-files-found: ignore | |
idp-stopper: | |
runs-on: ubuntu-latest | |
needs: [pre-reqs, search-users, roles-tests] | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: E2E Tests | |
uses: cypress-io/github-action@v6 | |
id: smoke | |
continue-on-error: false | |
with: | |
summary-title: 'E2E tests' | |
wait-on: 'https://bcgov.github.io/sso-requests-sandbox/' | |
wait-on-timeout: 360 | |
install-command: yarn | |
working-directory: app | |
spec: | | |
cypress/e2e/external/idpstopper-*.cy.ts | |
browser: electron | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: app/cypress/screenshots/**/* | |
if-no-files-found: ignore | |
# - uses: actions/upload-artifact@v4 | |
# if: failure() | |
# with: | |
# name: cypress-videos | |
# path: app/cypress/videos/**/* | |
# if-no-files-found: ignore | |
search-users: | |
runs-on: ubuntu-latest | |
needs: [pre-reqs] | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: E2E Tests | |
uses: cypress-io/github-action@v6 | |
id: smoke | |
continue-on-error: false | |
with: | |
summary-title: 'E2E tests' | |
wait-on: 'https://bcgov.github.io/sso-requests-sandbox/' | |
wait-on-timeout: 360 | |
install-command: yarn | |
working-directory: app | |
spec: | | |
cypress/e2e/external/search-users.cy.ts | |
browser: electron | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: app/cypress/screenshots/**/* | |
if-no-files-found: ignore | |
# - uses: actions/upload-artifact@v4 | |
# if: failure() | |
# with: | |
# name: cypress-videos | |
# path: app/cypress/videos/**/* | |
# if-no-files-found: ignore | |
roles-tests: | |
runs-on: ubuntu-latest | |
needs: [pre-reqs] | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: E2E Tests | |
uses: cypress-io/github-action@v6 | |
id: smoke | |
continue-on-error: false | |
with: | |
summary-title: 'E2E tests' | |
wait-on: 'https://bcgov.github.io/sso-requests-sandbox/' | |
wait-on-timeout: 360 | |
install-command: yarn | |
working-directory: app | |
spec: | | |
cypress/e2e/external/integration-roles.cy.ts | |
browser: electron | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: app/cypress/screenshots/**/* | |
if-no-files-found: ignore | |
# - uses: actions/upload-artifact@v4 | |
# if: failure() | |
# with: | |
# name: cypress-videos | |
# path: app/cypress/videos/**/* | |
# if-no-files-found: ignore | |
integration-tests: | |
runs-on: ubuntu-latest | |
needs: [pre-reqs] | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: E2E Tests | |
uses: cypress-io/github-action@v6 | |
id: smoke | |
continue-on-error: false | |
with: | |
summary-title: 'E2E tests' | |
wait-on: 'https://bcgov.github.io/sso-requests-sandbox/' | |
wait-on-timeout: 360 | |
install-command: yarn | |
working-directory: app | |
spec: | | |
cypress/e2e/ci/integrations-crud.cy.ts | |
browser: electron | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: app/cypress/screenshots/**/* | |
if-no-files-found: ignore | |
# - uses: actions/upload-artifact@v4 | |
# if: failure() | |
# with: | |
# name: cypress-videos | |
# path: app/cypress/videos/**/* | |
# if-no-files-found: ignore |