-
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
- Loading branch information
1 parent
6651a4e
commit 8881dfc
Showing
123 changed files
with
504 additions
and
337 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/ | ||
docs/ | ||
.github/ | ||
.run/ | ||
node_modules/ | ||
wiremock/ | ||
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Build wiremock docker image | ||
|
||
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_wiremock_image.outputs.version }} | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }}/wiremock | ||
|
||
jobs: | ||
|
||
wiremock_changes: | ||
with: | ||
what_to_check: wiremock | ||
uses: ./.github/workflows/checkForChanges.yml | ||
|
||
build_and_push_wiremock_image: | ||
# We want to build the image if there are changes in the wiremock folder, or if we are forcing a build, or if we are on the main branch | ||
if: needs.wiremock_changes.outputs.has_changes == 'true' || inputs.force_build == true || github.ref == 'refs/heads/main' | ||
needs: [wiremock_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: wiremock | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
- 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
Oops, something went wrong.