-
Notifications
You must be signed in to change notification settings - Fork 54
148 lines (148 loc) · 5.18 KB
/
e2eLocal.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#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