-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor e2e to increase speed and reliability (#5970)
Co-authored-by: Rin Concordia <93527746+rin-skylight@users.noreply.github.com>
- Loading branch information
1 parent
f795e6b
commit d95685e
Showing
125 changed files
with
437 additions
and
344 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#Ignore the following directories | ||
backend/build/ | ||
backend/.gradle/ | ||
frontend/build/ | ||
frontend/node_modules/ | ||
nginx/ | ||
ops/**/.terraform/ | ||
ops/services/app_functions/report_stream_batched_publisher/functions/node_modules/ | ||
docs/ | ||
.github/ | ||
.run/ | ||
node_modules/ | ||
cypress/node_modules/ | ||
cypress/screenshots/ | ||
cypress/videos/ |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Build frontend docker image with okta disabled | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
inputs: | ||
force_build: | ||
description: Force build | ||
required: false | ||
default: false | ||
type: boolean | ||
outputs: | ||
version: | ||
description: docker image version | ||
value: ${{ jobs.build_and_push_frontend_image.outputs.version }} | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }}/frontend-lighthouse | ||
|
||
jobs: | ||
|
||
frontend_changes: | ||
with: | ||
what_to_check: frontend | ||
uses: ./.github/workflows/checkForChanges.yml | ||
|
||
build_and_push_frontend_image: | ||
# We want to build the image if there are changes in the frontend folder, or if we are forcing a build, or if we are on the main branch | ||
if: needs.frontend_changes.outputs.has_changes == 'true' || inputs.force_build == true || github.ref == 'refs/heads/main' | ||
needs: [frontend_changes] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
outputs: | ||
version: ${{ steps.set.outputs.version }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: ./ | ||
file: ./frontend/Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
"REACT_APP_BASE_URL=https://localhost.simplereport.gov" | ||
"REACT_APP_BACKEND_URL=https://localhost.simplereport.gov/api" | ||
"PUBLIC_URL=/app/" | ||
"REACT_APP_OKTA_ENABLED=false" | ||
"REACT_APP_DISABLE_MAINTENANCE_BANNER=true" | ||
- name: Set version output | ||
shell: bash | ||
id: set | ||
run: echo "version=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}" >> "$GITHUB_OUTPUT" |
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="e2e local headless" type="js.build_tools.npm"> | ||
<package-json value="$PROJECT_DIR$/cypress/package.json" /> | ||
<command value="run" /> | ||
<scripts> | ||
<script value="e2e:local:run" /> | ||
</scripts> | ||
<node-interpreter value="project" /> | ||
<envs /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="e2e local open" type="js.build_tools.npm"> | ||
<package-json value="$PROJECT_DIR$/cypress/package.json" /> | ||
<command value="run" /> | ||
<scripts> | ||
<script value="e2e:local" /> | ||
</scripts> | ||
<node-interpreter value="project" /> | ||
<envs /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
Oops, something went wrong.