Skip to content

one more

one more #5356

Workflow file for this run

#name: Run end-to-end tests
#
#on:
# workflow_call:
# secrets:
# OKTA_API_KEY:
# required: true
# SMARTY_AUTH_ID:
# required: true
# SMARTY_AUTH_TOKEN:
# required: true
# CYPRESS_OKTA_USERNAME:
# required: true
# CYPRESS_OKTA_PASSWORD:
# required: true
# CYPRESS_OKTA_SECRET:
# required: true
# inputs:
# DOCKER_BACKEND_IMAGE_VERSION:
# required: false
# type: string
# DOCKER_CYPRESS_IMAGE_VERSION:
# required: false
# type: string
# DOCKER_DATABASE_IMAGE_VERSION:
# required: false
# type: string
# DOCKER_FRONTEND_IMAGE_VERSION:
# required: false
# type: string
# DOCKER_NGINX_IMAGE_VERSION:
# required: false
# type: string
#
#concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}-e2e-local
# cancel-in-progress: true
#
#jobs:
#
# cypress-local-env:
# runs-on: ubuntu-latest
# steps:
#
# - name: Checkout
# uses: actions/checkout@v4
#
# - name: Set Swap Space
# uses: ./.github/actions/set-swap-space
# with:
# swap-size-gb: 10
#
# - name: Update files permissions
# # Even though we don't use it, we need the .env file created here due to an issue similar to this one: https://github.com/mutagen-io/mutagen/issues/265
# run: |
# echo "::group::Update permissions"
# echo FAKE_ENV="true" >> .env
# sudo chmod -R 777 backend
# sudo chmod -R 777 frontend
# echo "::endgroup::"
#
# - name: Log in to the Container registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
#
# - name: Run Cypress
# timeout-minutes: 30
# env:
# # CI settings
# CI: 1
# # docker settings
# DOCKER_CLIENT_TIMEOUT: 180
# DOCKER_BACKEND_IMAGE_VERSION: ${{ inputs.DOCKER_BACKEND_IMAGE_VERSION }}
# DOCKER_CYPRESS_IMAGE_VERSION: ${{ inputs.DOCKER_CYPRESS_IMAGE_VERSION }}
# DOCKER_DATABASE_IMAGE_VERSION: ${{ inputs.DOCKER_DATABASE_IMAGE_VERSION }}
# DOCKER_FRONTEND_IMAGE_VERSION: ${{ inputs.DOCKER_FRONTEND_IMAGE_VERSION }}
# DOCKER_NGINX_IMAGE_VERSION: ${{ inputs.DOCKER_NGINX_IMAGE_VERSION }}
# COMPOSE_HTTP_TIMEOUT: 180
# # backend settings
# SPRING_PROFILES_ACTIVE: e2e,db-dockerized
# OKTA_TESTING_DISABLEHTTPSCHECK: "true"
# OKTA_API_KEY: ${{ secrets.OKTA_API_KEY }}
# OKTA_OAUTH2_CLIENT_ID: 0oa1k0163nAwfVxNW1d7
# SMARTY_AUTH_ID: ${{ secrets.SMARTY_AUTH_ID }}
# SMARTY_AUTH_TOKEN: ${{ secrets.SMARTY_AUTH_TOKEN }}
# SPRING_LIQUIBASE_ENABLED: "true"
# GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
# WIREMOCK_URL: "http://wiremock:8088"
# # cypress settings
# CYPRESS_OKTA_REDIRECT_URI: "https%3A%2F%2Flocalhost.simplereport.gov%2Fapp"
# CYPRESS_OKTA_USERNAME: ${{ secrets.CYPRESS_OKTA_USERNAME }}
# CYPRESS_OKTA_PASSWORD: ${{ secrets.CYPRESS_OKTA_PASSWORD }}
# CYPRESS_OKTA_SECRET: ${{ secrets.CYPRESS_OKTA_SECRET }}
# CYPRESS_BACKEND_URL: "https://localhost.simplereport.gov/api"
# SPEC_PATH: "cypress/e2e/**"
# TEST_ENV: "https://localhost.simplereport.gov"
# # frontend settings
# REACT_APP_OKTA_URL: "http://wiremock:8088"
# REACT_APP_OKTA_CLIENT_ID: 0oa1k0163nAwfVxNW1d7
# REACT_APP_BASE_URL: https://localhost.simplereport.gov
# REACT_APP_BACKEND_URL: https://localhost.simplereport.gov/api
# PUBLIC_URL: /app/
# REACT_APP_OKTA_ENABLED: "true"
# REACT_APP_DISABLE_MAINTENANCE_BANNER: "true"
# shell: bash
# run: |
# echo "::group::Run Cypress locally"
# echo "Backend branch tag (or latest): ${{ inputs.DOCKER_BACKEND_IMAGE_VERSION }}"
# echo "Cypress branch tag (or latest): ${{ inputs.DOCKER_CYPRESS_IMAGE_VERSION }}"
# echo "Database branch tag (or latest): ${{ inputs.DOCKER_DATABASE_IMAGE_VERSION }}"
# echo "Frontend branch tag (or latest): ${{ inputs.DOCKER_FRONTEND_IMAGE_VERSION }}"
# echo "Nginx branch tag (or latest): ${{ inputs.DOCKER_NGINX_IMAGE_VERSION }}"
# docker compose -f docker-compose.yml -f docker-compose.cypress.yml up --abort-on-container-exit --attach cypress --exit-code-from cypress --quiet-pull
# echo "::endgroup::"
#
# - name: Get docker logs
# if: always()
# shell: bash
# run: |
# echo "Saving $container logs"
# docker compose -f docker-compose.yml -f docker-compose.cypress.yml logs --timestamps >& cypress-run.log
#
# - name: Stop containers
# if: always()
# shell: bash
# run: |
# echo "::group::Stop Docker containers"
# docker compose -f docker-compose.yml -f docker-compose.cypress.yml down
# echo "::endgroup::"
#
# - name: Archive cypress failures
# if: always()
# uses: actions/upload-artifact@v3
# with:
# name: cypress-results
# path: |
# cypress/videos/*
# cypress/screenshots/*
#
# - name: Archive docker logs
# if: always()
# uses: actions/upload-artifact@v3
# with:
# name: logs
# path: cypress-run.log