From 505cf981ddd13162f53f46b3536a00be43f47904 Mon Sep 17 00:00:00 2001 From: Bob Zhao Date: Wed, 10 Jan 2024 14:18:48 -0500 Subject: [PATCH] comment out other workflows --- .github/workflows/checkForChanges.yml | 66 +-- .github/workflows/checkGraphql.yml | 118 ++--- .github/workflows/chromatic.yml | 128 ++--- .github/workflows/codeql.yml | 110 ++--- .github/workflows/coverity.yml | 148 +++--- .github/workflows/lighthouse.yml | 170 +++---- .github/workflows/liquibaseClearChecksums.yml | 80 ++-- .github/workflows/liquibaseRollback.yml | 94 ++-- .github/workflows/test.yml | 440 +++++++++--------- .github/workflows/testingWorkflow.yml | 66 +-- 10 files changed, 710 insertions(+), 710 deletions(-) diff --git a/.github/workflows/checkForChanges.yml b/.github/workflows/checkForChanges.yml index badc700b5c..1ca0621035 100644 --- a/.github/workflows/checkForChanges.yml +++ b/.github/workflows/checkForChanges.yml @@ -1,33 +1,33 @@ -name: Check for Changes -# Reusable workflow, compatible with push and pull_request events -on: - workflow_call: - inputs: - # can be a file or a folder - what_to_check: - required: true - type: string - outputs: - has_changes: - description: true or false string - value: ${{ jobs.check_for_changes.outputs.has_changes }} -jobs: - check_for_changes: - runs-on: ubuntu-latest - outputs: - has_changes: ${{ steps.check_for_changes.outputs.has_changes }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - shell: bash - id: check_for_changes - run: | - echo "::group::Set has_changes output" - diff=$(git diff-tree --no-commit-id --name-only -r "origin/main" HEAD -- "${{ inputs.what_to_check }}") - echo "Diff: $diff" - diff_length=$(echo ${#diff}) - has_diff=$([ $diff_length -gt 0 ] && echo "true" || echo "false") - echo "The Changes: ${has_diff}" - echo "has_changes=${has_diff}" >> "$GITHUB_OUTPUT" - echo "::endgroup::" +#name: Check for Changes +## Reusable workflow, compatible with push and pull_request events +#on: +# workflow_call: +# inputs: +# # can be a file or a folder +# what_to_check: +# required: true +# type: string +# outputs: +# has_changes: +# description: true or false string +# value: ${{ jobs.check_for_changes.outputs.has_changes }} +#jobs: +# check_for_changes: +# runs-on: ubuntu-latest +# outputs: +# has_changes: ${{ steps.check_for_changes.outputs.has_changes }} +# steps: +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# - shell: bash +# id: check_for_changes +# run: | +# echo "::group::Set has_changes output" +# diff=$(git diff-tree --no-commit-id --name-only -r "origin/main" HEAD -- "${{ inputs.what_to_check }}") +# echo "Diff: $diff" +# diff_length=$(echo ${#diff}) +# has_diff=$([ $diff_length -gt 0 ] && echo "true" || echo "false") +# echo "The Changes: ${has_diff}" +# echo "has_changes=${has_diff}" >> "$GITHUB_OUTPUT" +# echo "::endgroup::" diff --git a/.github/workflows/checkGraphql.yml b/.github/workflows/checkGraphql.yml index 597ec82fd0..5432a7fbfd 100644 --- a/.github/workflows/checkGraphql.yml +++ b/.github/workflows/checkGraphql.yml @@ -1,59 +1,59 @@ -name: Check Graphql - -on: - workflow_dispatch: - pull_request: - branches: - - "**" - merge_group: - types: - - checks_requested - push: - branches: - - main - -env: - NODE_VERSION: 18 - -defaults: - run: - working-directory: frontend - -jobs: - check-graphql-types: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{env.NODE_VERSION}} - uses: actions/setup-node@v4.0.1 - with: - node-version: ${{env.NODE_VERSION}} - - name: Cache yarn - uses: actions/cache@v3.3.2 - with: - path: ~/.cache/yarn - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Node setup - run: yarn install --prefer-offline - - name: Generate grahpql types - run: yarn codegen - - name: Lint generated files - run: yarn lint:write - - name: Check for changes - run: | - if [[ -z "$(git status --porcelain)" ]]; then - exit 0 - else - echo "Current generated code does not match code in latest commit. try running cd frontend/ && yarn codegen" - git diff >> diff.txt - exit 1 - fi - - name: Archive git diff - uses: actions/upload-artifact@v4 - if: failure() - with: - name: files changed - path: frontend/diff.txt - retention-days: 7 +#name: Check Graphql +# +#on: +# workflow_dispatch: +# pull_request: +# branches: +# - "**" +# merge_group: +# types: +# - checks_requested +# push: +# branches: +# - main +# +#env: +# NODE_VERSION: 18 +# +#defaults: +# run: +# working-directory: frontend +# +#jobs: +# check-graphql-types: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: Use Node.js ${{env.NODE_VERSION}} +# uses: actions/setup-node@v4.0.1 +# with: +# node-version: ${{env.NODE_VERSION}} +# - name: Cache yarn +# uses: actions/cache@v3.3.2 +# with: +# path: ~/.cache/yarn +# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} +# restore-keys: | +# ${{ runner.os }}-yarn- +# - name: Node setup +# run: yarn install --prefer-offline +# - name: Generate grahpql types +# run: yarn codegen +# - name: Lint generated files +# run: yarn lint:write +# - name: Check for changes +# run: | +# if [[ -z "$(git status --porcelain)" ]]; then +# exit 0 +# else +# echo "Current generated code does not match code in latest commit. try running cd frontend/ && yarn codegen" +# git diff >> diff.txt +# exit 1 +# fi +# - name: Archive git diff +# uses: actions/upload-artifact@v4 +# if: failure() +# with: +# name: files changed +# path: frontend/diff.txt +# retention-days: 7 diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 2a4017cd38..345150cef9 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -1,64 +1,64 @@ -name: Chromatic - -on: - workflow_dispatch: - pull_request: - branches: - - "**" - paths: - - "frontend/**" - push: - branches: - - main - paths: - - "frontend/**" - -env: - NODE_VERSION: 18 - -jobs: - chromatic-deployment: - runs-on: ubuntu-latest - steps: - - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Chromatic wants the history - - - uses: actions/setup-node@v4.0.1 - with: - node-version: ${{ env.NODE_VERSION }} - - - name: Install dependencies - run: yarn - working-directory: frontend - - - name: Publish to Chromatic - if: github.ref != 'refs/heads/main' - uses: chromaui/action@v10 - with: - workingDir: frontend - token: ${{ secrets.GITHUB_TOKEN }} - projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - ignoreLastBuildOnBranch: "**" # Better comparisons after rebasing - exitZeroOnChanges: true - exitOnceUploaded: true - - - name: Publish to Chromatic (auto-accept changes on merge main) - if: github.ref == 'refs/heads/main' - uses: chromaui/action@v10 - with: - workingDir: frontend - token: ${{ secrets.GITHUB_TOKEN }} - projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - ignoreLastBuildOnBranch: "**" - exitZeroOnChanges: true - exitOnceUploaded: true - autoAcceptChanges: true # handle squash-on-merge - - - name: Artifact Chromatic logs - if: failure() - uses: actions/upload-artifact@v4 - with: - name: logs - path: frontend/*.log +#name: Chromatic +# +#on: +# workflow_dispatch: +# pull_request: +# branches: +# - "**" +# paths: +# - "frontend/**" +# push: +# branches: +# - main +# paths: +# - "frontend/**" +# +#env: +# NODE_VERSION: 18 +# +#jobs: +# chromatic-deployment: +# runs-on: ubuntu-latest +# steps: +# +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 0 # Chromatic wants the history +# +# - uses: actions/setup-node@v4.0.1 +# with: +# node-version: ${{ env.NODE_VERSION }} +# +# - name: Install dependencies +# run: yarn +# working-directory: frontend +# +# - name: Publish to Chromatic +# if: github.ref != 'refs/heads/main' +# uses: chromaui/action@v10 +# with: +# workingDir: frontend +# token: ${{ secrets.GITHUB_TOKEN }} +# projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} +# ignoreLastBuildOnBranch: "**" # Better comparisons after rebasing +# exitZeroOnChanges: true +# exitOnceUploaded: true +# +# - name: Publish to Chromatic (auto-accept changes on merge main) +# if: github.ref == 'refs/heads/main' +# uses: chromaui/action@v10 +# with: +# workingDir: frontend +# token: ${{ secrets.GITHUB_TOKEN }} +# projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} +# ignoreLastBuildOnBranch: "**" +# exitZeroOnChanges: true +# exitOnceUploaded: true +# autoAcceptChanges: true # handle squash-on-merge +# +# - name: Artifact Chromatic logs +# if: failure() +# uses: actions/upload-artifact@v4 +# with: +# name: logs +# path: frontend/*.log diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 43eaf7ed75..fd18c2240c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,55 +1,55 @@ -name: "CodeQL" - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - schedule: - - cron: "45 4 * * 3" - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - JAVA_VERSION: 17 - JAVA_DISTRIBUTION: 'zulu' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ javascript, java ] - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - queries: +security-and-quality - - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: ${{env.JAVA_VERSION}} - distribution: ${{env.JAVA_DISTRIBUTION}} - - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{ matrix.language }}" \ No newline at end of file +#name: "CodeQL" +# +#on: +# push: +# branches: [ "main" ] +# pull_request: +# branches: [ "main" ] +# schedule: +# - cron: "45 4 * * 3" +# +#concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true +# +#env: +# JAVA_VERSION: 17 +# JAVA_DISTRIBUTION: 'zulu' +# +#jobs: +# analyze: +# name: Analyze +# runs-on: ubuntu-latest +# permissions: +# actions: read +# contents: read +# security-events: write +# +# strategy: +# fail-fast: false +# matrix: +# language: [ javascript, java ] +# +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# +# - name: Initialize CodeQL +# uses: github/codeql-action/init@v3 +# with: +# languages: ${{ matrix.language }} +# queries: +security-and-quality +# +# - name: Set up JDK +# uses: actions/setup-java@v4 +# with: +# java-version: ${{env.JAVA_VERSION}} +# distribution: ${{env.JAVA_DISTRIBUTION}} +# +# - name: Autobuild +# uses: github/codeql-action/autobuild@v3 +# +# - name: Perform CodeQL Analysis +# uses: github/codeql-action/analyze@v3 +# with: +# category: "/language:${{ matrix.language }}" \ No newline at end of file diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 71d929184b..aa47f70530 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -1,74 +1,74 @@ -name: coverity-scan -on: - workflow_dispatch: # because sometimes you just want to force a branch to have tests run - push: - branches: - - main - paths: - - .github/workflows/coverity_scan.yml - pull_request: - branches: - - "**" - paths: - - .github/workflows/coverity_scan.yml - schedule: - - cron: '0 18 * * *' # Daily at 18:00 UTC - -env: - JAVA_VERSION: 17 - JAVA_DISTRIBUTION: 'zulu' - NODE_VERSION: 18 - -defaults: - run: - working-directory: ./backend - -jobs: - scan: - runs-on: ubuntu-latest - if: ${{ github.actor != 'dependabot[bot]' }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4.0.1 - with: - node-version: ${{env.NODE_VERSION}} - - name: Cache npm local files - uses: actions/cache@v3.3.2 - with: - path: | - ./frontend/node_modules - key: npm-${{env.NODE_VERSION}}-${{ hashFiles('frontend/yarn.lock', 'frontend/package.json') }} - - name: Install dependencies - run: yarn install - working-directory: ./frontend - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: ${{env.JAVA_VERSION}} - distribution: ${{env.JAVA_DISTRIBUTION}} - - name: Cache Java Dependencies - uses: actions/cache@v3.3.2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-build-${{ hashFiles('*.gradle', 'gradle/dependency-locks/*') }} - - name: Download Coverity Build Tool - run: | - wget -q https://scan.coverity.com/download/java/linux64 --post-data "token=${{ secrets.COVERITY_TOKEN }}&project=CDCgov/prime-simplereport" -O cov-analysis-linux64.tar.gz - mkdir cov-analysis-linux64 - tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 - - name: Build with cov-build - run: | - export PATH=`pwd`/cov-analysis-linux64/bin:$PATH - cov-build --dir cov-int --fs-capture-search ../frontend ./gradlew clean assemble - - name: Submit the result to Coverity Scan - run: | - tar czvf sr.tgz cov-int - curl \ - --form token=${{ secrets.COVERITY_TOKEN }} \ - --form email=nicholas.a.robison@omb.eop.gov \ - --form file=@sr.tgz \ - --form version=${{ env.GITHUB_REF }} \ - --form description="`git rev-parse --short HEAD`" \ - https://scan.coverity.com/builds?project=CDCgov%2Fprime-simplereport +#name: coverity-scan +#on: +# workflow_dispatch: # because sometimes you just want to force a branch to have tests run +# push: +# branches: +# - main +# paths: +# - .github/workflows/coverity_scan.yml +# pull_request: +# branches: +# - "**" +# paths: +# - .github/workflows/coverity_scan.yml +# schedule: +# - cron: '0 18 * * *' # Daily at 18:00 UTC +# +#env: +# JAVA_VERSION: 17 +# JAVA_DISTRIBUTION: 'zulu' +# NODE_VERSION: 18 +# +#defaults: +# run: +# working-directory: ./backend +# +#jobs: +# scan: +# runs-on: ubuntu-latest +# if: ${{ github.actor != 'dependabot[bot]' }} +# steps: +# - uses: actions/checkout@v4 +# - uses: actions/setup-node@v4.0.1 +# with: +# node-version: ${{env.NODE_VERSION}} +# - name: Cache npm local files +# uses: actions/cache@v3.3.2 +# with: +# path: | +# ./frontend/node_modules +# key: npm-${{env.NODE_VERSION}}-${{ hashFiles('frontend/yarn.lock', 'frontend/package.json') }} +# - name: Install dependencies +# run: yarn install +# working-directory: ./frontend +# - name: Set up JDK +# uses: actions/setup-java@v4 +# with: +# java-version: ${{env.JAVA_VERSION}} +# distribution: ${{env.JAVA_DISTRIBUTION}} +# - name: Cache Java Dependencies +# uses: actions/cache@v3.3.2 +# with: +# path: | +# ~/.gradle/caches +# ~/.gradle/wrapper +# key: gradle-build-${{ hashFiles('*.gradle', 'gradle/dependency-locks/*') }} +# - name: Download Coverity Build Tool +# run: | +# wget -q https://scan.coverity.com/download/java/linux64 --post-data "token=${{ secrets.COVERITY_TOKEN }}&project=CDCgov/prime-simplereport" -O cov-analysis-linux64.tar.gz +# mkdir cov-analysis-linux64 +# tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 +# - name: Build with cov-build +# run: | +# export PATH=`pwd`/cov-analysis-linux64/bin:$PATH +# cov-build --dir cov-int --fs-capture-search ../frontend ./gradlew clean assemble +# - name: Submit the result to Coverity Scan +# run: | +# tar czvf sr.tgz cov-int +# curl \ +# --form token=${{ secrets.COVERITY_TOKEN }} \ +# --form email=nicholas.a.robison@omb.eop.gov \ +# --form file=@sr.tgz \ +# --form version=${{ env.GITHUB_REF }} \ +# --form description="`git rev-parse --short HEAD`" \ +# https://scan.coverity.com/builds?project=CDCgov%2Fprime-simplereport diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml index 87cfac1038..50fe05451f 100644 --- a/.github/workflows/lighthouse.yml +++ b/.github/workflows/lighthouse.yml @@ -1,85 +1,85 @@ -name: Run Lighthouse Audit -on: - workflow_call: - inputs: - DOCKER_BACKEND_IMAGE_VERSION: - required: false - type: string - DOCKER_DATABASE_IMAGE_VERSION: - required: false - type: string - DOCKER_NGINX_IMAGE_VERSION: - required: false - type: string - DOCKER_FRONTEND_LIGHTHOUSE_IMAGE_VERSION: - required: false - type: string - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - lhci: - name: Lighthouse - 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: Add hosts to /etc/hosts - run: | - sudo echo "127.0.0.1 localhost.simplereport.gov" | sudo tee -a /etc/hosts - - - 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: Setup and Run Lighthouse - env: - # CI settings - CI: 1 - # docker settings - DOCKER_CLIENT_TIMEOUT: 180 - COMPOSE_HTTP_TIMEOUT: 180 - DOCKER_BACKEND_IMAGE_VERSION: ${{ inputs.DOCKER_BACKEND_IMAGE_VERSION }} - DOCKER_DATABASE_IMAGE_VERSION: ${{ inputs.DOCKER_DATABASE_IMAGE_VERSION }} - DOCKER_NGINX_IMAGE_VERSION: ${{ inputs.DOCKER_NGINX_IMAGE_VERSION }} - DOCKER_FRONTEND_LIGHTHOUSE_IMAGE_VERSION: ${{ inputs.DOCKER_FRONTEND_LIGHTHOUSE_IMAGE_VERSION }} - shell: bash - run: | - echo "::group::Running containers" - echo "Backend branch tag (or latest): ${{ inputs.DOCKER_BACKEND_IMAGE_VERSION }}" - echo "Database branch tag (or latest): ${{ inputs.DOCKER_DATABASE_IMAGE_VERSION }}" - echo "Nginx branch tag (or latest): ${{ inputs.DOCKER_NGINX_IMAGE_VERSION }}" - echo "Frontend branch tag (or latest): ${{ inputs.DOCKER_FRONTEND_LIGHTHOUSE_IMAGE_VERSION }}" - echo "::endgroup::" - - echo "::group::Run Lighthouse locally" - bash lighthouse.sh - echo "::endgroup::" - - - name: Archive Lighthouse results - uses: actions/upload-artifact@v4 - if: always() - with: - name: lighthouse-results - path: lighthouse/* \ No newline at end of file +#name: Run Lighthouse Audit +#on: +# workflow_call: +# inputs: +# DOCKER_BACKEND_IMAGE_VERSION: +# required: false +# type: string +# DOCKER_DATABASE_IMAGE_VERSION: +# required: false +# type: string +# DOCKER_NGINX_IMAGE_VERSION: +# required: false +# type: string +# DOCKER_FRONTEND_LIGHTHOUSE_IMAGE_VERSION: +# required: false +# type: string +# +#concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true +# +#jobs: +# lhci: +# name: Lighthouse +# 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: Add hosts to /etc/hosts +# run: | +# sudo echo "127.0.0.1 localhost.simplereport.gov" | sudo tee -a /etc/hosts +# +# - 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: Setup and Run Lighthouse +# env: +# # CI settings +# CI: 1 +# # docker settings +# DOCKER_CLIENT_TIMEOUT: 180 +# COMPOSE_HTTP_TIMEOUT: 180 +# DOCKER_BACKEND_IMAGE_VERSION: ${{ inputs.DOCKER_BACKEND_IMAGE_VERSION }} +# DOCKER_DATABASE_IMAGE_VERSION: ${{ inputs.DOCKER_DATABASE_IMAGE_VERSION }} +# DOCKER_NGINX_IMAGE_VERSION: ${{ inputs.DOCKER_NGINX_IMAGE_VERSION }} +# DOCKER_FRONTEND_LIGHTHOUSE_IMAGE_VERSION: ${{ inputs.DOCKER_FRONTEND_LIGHTHOUSE_IMAGE_VERSION }} +# shell: bash +# run: | +# echo "::group::Running containers" +# echo "Backend branch tag (or latest): ${{ inputs.DOCKER_BACKEND_IMAGE_VERSION }}" +# echo "Database branch tag (or latest): ${{ inputs.DOCKER_DATABASE_IMAGE_VERSION }}" +# echo "Nginx branch tag (or latest): ${{ inputs.DOCKER_NGINX_IMAGE_VERSION }}" +# echo "Frontend branch tag (or latest): ${{ inputs.DOCKER_FRONTEND_LIGHTHOUSE_IMAGE_VERSION }}" +# echo "::endgroup::" +# +# echo "::group::Run Lighthouse locally" +# bash lighthouse.sh +# echo "::endgroup::" +# +# - name: Archive Lighthouse results +# uses: actions/upload-artifact@v4 +# if: always() +# with: +# name: lighthouse-results +# path: lighthouse/* \ No newline at end of file diff --git a/.github/workflows/liquibaseClearChecksums.yml b/.github/workflows/liquibaseClearChecksums.yml index 735e0668d9..5a692fa203 100644 --- a/.github/workflows/liquibaseClearChecksums.yml +++ b/.github/workflows/liquibaseClearChecksums.yml @@ -1,40 +1,40 @@ -name: Liquibase Clear Checksums - -concurrency: - group: db-actions - cancel-in-progress: false - -on: - workflow_dispatch: - inputs: - deploy_env: - description: The environment of the database. - required: true - type: choice - options: [demo, dev, dev2, dev3, dev4, dev5, dev6, dev7, pentest, test, training, stg, prod] - default: dev - action: - description: The liquibase action to run. - required: true - options: [clear-checksums] - default: clear-checksums - -jobs: - - db_clear_checksums_action: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: DB Liquibase Rollback - uses: ./.github/actions/db-actions - with: - deploy_env: ${{ github.event.inputs.deploy_env }} - action: ${{ github.event.inputs.action }} - azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} - acr_repo_url: ${{ secrets.ACR_REPO_URL }} - acr_admin_username: ${{ secrets.ACR_ADMIN_USERNAME }} - acr_admin_pasword: ${{ secrets.ACR_ADMIN_PASWORD }} - terraform_arm_client_id: ${{ secrets.TERRAFORM_ARM_CLIENT_ID }} - terraform_arm_client_secret: ${{ secrets.TERRAFORM_ARM_CLIENT_SECRET }} - terraform_arm_subscription_id: ${{ secrets.TERRAFORM_ARM_SUBSCRIPTION_ID }} - terraform_arm_tenant_id: ${{ secrets.TERRAFORM_ARM_TENANT_ID }} +#name: Liquibase Clear Checksums +# +#concurrency: +# group: db-actions +# cancel-in-progress: false +# +#on: +# workflow_dispatch: +# inputs: +# deploy_env: +# description: The environment of the database. +# required: true +# type: choice +# options: [demo, dev, dev2, dev3, dev4, dev5, dev6, dev7, pentest, test, training, stg, prod] +# default: dev +# action: +# description: The liquibase action to run. +# required: true +# options: [clear-checksums] +# default: clear-checksums +# +#jobs: +# +# db_clear_checksums_action: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: DB Liquibase Rollback +# uses: ./.github/actions/db-actions +# with: +# deploy_env: ${{ github.event.inputs.deploy_env }} +# action: ${{ github.event.inputs.action }} +# azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} +# acr_repo_url: ${{ secrets.ACR_REPO_URL }} +# acr_admin_username: ${{ secrets.ACR_ADMIN_USERNAME }} +# acr_admin_pasword: ${{ secrets.ACR_ADMIN_PASWORD }} +# terraform_arm_client_id: ${{ secrets.TERRAFORM_ARM_CLIENT_ID }} +# terraform_arm_client_secret: ${{ secrets.TERRAFORM_ARM_CLIENT_SECRET }} +# terraform_arm_subscription_id: ${{ secrets.TERRAFORM_ARM_SUBSCRIPTION_ID }} +# terraform_arm_tenant_id: ${{ secrets.TERRAFORM_ARM_TENANT_ID }} diff --git a/.github/workflows/liquibaseRollback.yml b/.github/workflows/liquibaseRollback.yml index a4ca30f422..97a975e6e7 100644 --- a/.github/workflows/liquibaseRollback.yml +++ b/.github/workflows/liquibaseRollback.yml @@ -1,47 +1,47 @@ -name: Liquibase Rollback - -concurrency: - group: db-actions - cancel-in-progress: false - -on: - workflow_dispatch: - inputs: - deploy_env: - description: The environment of the database. - required: true - type: choice - options: [demo, dev, dev2, dev3, dev4, dev5, dev6, dev7, pentest, test, training, stg, prod] - default: dev - action: - description: The liquibase action to run. - required: true - type: choice - options: [rollback] - default: rollback - liquibase_rollback_tag: - description: The Liquibase tag to roll back to - required: true - type: string - default: "" - -jobs: - - db_rollback_action: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: DB Liquibase Rollback - uses: ./.github/actions/db-actions - with: - deploy_env: ${{ github.event.inputs.deploy_env }} - action: ${{ github.event.inputs.action }} - liquibase_rollback_tag: ${{ github.event.inputs.liquibase_rollback_tag }} - azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} - acr_repo_url: ${{ secrets.ACR_REPO_URL }} - acr_admin_username: ${{ secrets.ACR_ADMIN_USERNAME }} - acr_admin_pasword: ${{ secrets.ACR_ADMIN_PASWORD }} - terraform_arm_client_id: ${{ secrets.TERRAFORM_ARM_CLIENT_ID }} - terraform_arm_client_secret: ${{ secrets.TERRAFORM_ARM_CLIENT_SECRET }} - terraform_arm_subscription_id: ${{ secrets.TERRAFORM_ARM_SUBSCRIPTION_ID }} - terraform_arm_tenant_id: ${{ secrets.TERRAFORM_ARM_TENANT_ID }} +#name: Liquibase Rollback +# +#concurrency: +# group: db-actions +# cancel-in-progress: false +# +#on: +# workflow_dispatch: +# inputs: +# deploy_env: +# description: The environment of the database. +# required: true +# type: choice +# options: [demo, dev, dev2, dev3, dev4, dev5, dev6, dev7, pentest, test, training, stg, prod] +# default: dev +# action: +# description: The liquibase action to run. +# required: true +# type: choice +# options: [rollback] +# default: rollback +# liquibase_rollback_tag: +# description: The Liquibase tag to roll back to +# required: true +# type: string +# default: "" +# +#jobs: +# +# db_rollback_action: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: DB Liquibase Rollback +# uses: ./.github/actions/db-actions +# with: +# deploy_env: ${{ github.event.inputs.deploy_env }} +# action: ${{ github.event.inputs.action }} +# liquibase_rollback_tag: ${{ github.event.inputs.liquibase_rollback_tag }} +# azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} +# acr_repo_url: ${{ secrets.ACR_REPO_URL }} +# acr_admin_username: ${{ secrets.ACR_ADMIN_USERNAME }} +# acr_admin_pasword: ${{ secrets.ACR_ADMIN_PASWORD }} +# terraform_arm_client_id: ${{ secrets.TERRAFORM_ARM_CLIENT_ID }} +# terraform_arm_client_secret: ${{ secrets.TERRAFORM_ARM_CLIENT_SECRET }} +# terraform_arm_subscription_id: ${{ secrets.TERRAFORM_ARM_SUBSCRIPTION_ID }} +# terraform_arm_tenant_id: ${{ secrets.TERRAFORM_ARM_TENANT_ID }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 256348dad7..8b4a34f3c1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,220 +1,220 @@ -name: Test - -on: - workflow_call: - secrets: - SONAR_TOKEN: - description: secrets.SONAR_TOKEN - required: true - TWILIO_ACCOUNT_SID: - description: secrets.TWILIO_TEST_ACCOUNT_SID - required: true - TWILIO_AUTH_TOKEN: - description: secrets.TWILIO_TEST_AUTH_TOKEN - required: true - inputs: - DOCKER_DATABASE_IMAGE_VERSION: - required: false - type: string - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-test - cancel-in-progress: true - -env: - NODE_VERSION: 18 - JAVA_VERSION: 17 - JAVA_DISTRIBUTION: 'zulu' - PROJECT_ROOT: /home/runner/work/prime-simplereport/prime-simplereport # Hardcoding this here because env.WORKSPACE_ROOT gets overridden by one of the steps downstream. We only need this for Sonar. - -defaults: - run: - working-directory: backend - -jobs: - backend-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up JDK ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v4 - with: - java-version: ${{ env.JAVA_VERSION }} - distribution: ${{ env.JAVA_DISTRIBUTION }} - - name: Cache Java Dependencies - uses: actions/cache@v3.3.2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ hashFiles('*.gradle', 'gradle/dependency-locks/*') }} - - name: Start DB - env: - DOCKER_DATABASE_IMAGE_VERSION: ${{ inputs.DOCKER_DATABASE_IMAGE_VERSION }} - run: touch ../.env && docker compose -f ../docker-compose.yml up -d db - - name: Run tests - env: - OKTA_TESTING_DISABLEHTTPS: true - TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }} - TWILIO_AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }} - run: ./gradlew jacocoTestReport -PtestDbPort=5432 - - name: Cache backend coverage results - uses: actions/cache@v3.3.2 - with: - path: backend/build/** - key: ${{ runner.os }}-backend-coverage-${{ github.run_id }}-${{ github.run_attempt }} - - name: Archive failed test results - uses: actions/upload-artifact@v4 - if: failure() - with: - name: backend-test-report - path: backend/build/reports/tests/test - retention-days: 7 - frontend-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@v4.0.1 - with: - node-version: ${{ env.NODE_VERSION }} - - name: Cache yarn - uses: actions/cache@v3.3.2 - with: - path: ~/.cache/yarn - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - - name: Node setup - working-directory: ./frontend - run: yarn install --prefer-offline - - name: Run tests - working-directory: ./frontend - run: yarn test:ci - - name: Cache frontend coverage results - uses: actions/cache@v3.3.2 - with: - path: | - frontend/coverage/** - key: ${{ runner.os }}-frontend-coverage-${{ github.run_id }}-${{ github.run_attempt }} - function-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: "Function Apps: yarn install" - working-directory: ./ops/services/app_functions/report_stream_batched_publisher/functions - run: yarn - - name: "Function Apps: Test" - working-directory: ./ops/services/app_functions/report_stream_batched_publisher/functions - run: yarn coverage - - name: Cache function coverage results - uses: actions/cache@v3.3.2 - with: - path: | - ops/services/app_functions/report_stream_batched_publisher/functions/coverage/** - key: ${{ runner.os }}-function-coverage-${{ github.run_id }}-${{ github.run_attempt }} - - name: Archive function coverage results - uses: actions/upload-artifact@v4 - with: - name: function-coverage - path: ops/services/app_functions/report_stream_batched_publisher/functions/coverage - sonar: - needs: [backend-tests, frontend-tests, function-tests] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - if: ${{ github.actor != 'dependabot[bot]' }} - with: - fetch-depth: 0 # Disable shallow clones so Sonar can have all the data - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any - - name: Restore backend cache - if: ${{ github.actor != 'dependabot[bot]' }} - uses: actions/cache@v3.3.2 - with: - path: | - backend/build/** - key: ${{ runner.os }}-backend-coverage-${{ github.run_id }}-${{ github.run_attempt }} - - name: Restore frontend cache - if: ${{ github.actor != 'dependabot[bot]' }} - uses: actions/cache@v3.3.2 - with: - path: | - frontend/coverage/** - key: ${{ runner.os }}-frontend-coverage-${{ github.run_id }}-${{ github.run_attempt }} - - name: Restore functions cache - if: ${{ github.actor != 'dependabot[bot]' }} - uses: actions/cache@v3.3.2 - with: - path: | - ops/services/app_functions/report_stream_batched_publisher/functions/coverage/** - key: ${{ runner.os }}-function-coverage-${{ github.run_id }}-${{ github.run_attempt }} - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: ${{ env.JAVA_VERSION }} - distribution: ${{ env.JAVA_DISTRIBUTION }} - - name: Sonar analysis - if: ${{ github.actor != 'dependabot[bot]' }} - run: ./gradlew sonarqube -Dsonar.projectBaseDir=${{ env.PROJECT_ROOT }} --info - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - build-jar: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up JDK ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v4 - with: - java-version: ${{ env.JAVA_VERSION }} - distribution: ${{ env.JAVA_DISTRIBUTION }} - - name: Cache Java dependencies - uses: actions/cache@v3.3.2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ hashFiles('*.gradle', 'gradle/dependency-locks/*') }} - - name: Run Java build - run: ./gradlew assemble - backend-lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up JDK ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v4 - with: - java-version: ${{ env.JAVA_VERSION }} - distribution: ${{ env.JAVA_DISTRIBUTION }} - - name: Cache Java dependencies - uses: actions/cache@v3.3.2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ hashFiles('*.gradle', 'gradle/dependency-locks/*') }} - - name: Run style checks - run: ./gradlew checkstyleMain checkstyleTest spotlessCheck --continue - frontend-lint-and-build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@v4.0.1 - with: - node-version: ${{ env.NODE_VERSION }} - - name: Cache yarn - uses: actions/cache@v3.3.2 - with: - path: ~/.cache/yarn - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Node setup - working-directory: ./frontend - run: yarn - - name: Lint front-end - working-directory: ./frontend - run: yarn lint - - name: Build release - working-directory: ./frontend - run: yarn build +#name: Test +# +#on: +# workflow_call: +# secrets: +# SONAR_TOKEN: +# description: secrets.SONAR_TOKEN +# required: true +# TWILIO_ACCOUNT_SID: +# description: secrets.TWILIO_TEST_ACCOUNT_SID +# required: true +# TWILIO_AUTH_TOKEN: +# description: secrets.TWILIO_TEST_AUTH_TOKEN +# required: true +# inputs: +# DOCKER_DATABASE_IMAGE_VERSION: +# required: false +# type: string +# +#concurrency: +# group: ${{ github.workflow }}-${{ github.ref }}-test +# cancel-in-progress: true +# +#env: +# NODE_VERSION: 18 +# JAVA_VERSION: 17 +# JAVA_DISTRIBUTION: 'zulu' +# PROJECT_ROOT: /home/runner/work/prime-simplereport/prime-simplereport # Hardcoding this here because env.WORKSPACE_ROOT gets overridden by one of the steps downstream. We only need this for Sonar. +# +#defaults: +# run: +# working-directory: backend +# +#jobs: +# backend-tests: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: Set up JDK ${{ env.JAVA_VERSION }} +# uses: actions/setup-java@v4 +# with: +# java-version: ${{ env.JAVA_VERSION }} +# distribution: ${{ env.JAVA_DISTRIBUTION }} +# - name: Cache Java Dependencies +# uses: actions/cache@v3.3.2 +# with: +# path: | +# ~/.gradle/caches +# ~/.gradle/wrapper +# key: gradle-${{ hashFiles('*.gradle', 'gradle/dependency-locks/*') }} +# - name: Start DB +# env: +# DOCKER_DATABASE_IMAGE_VERSION: ${{ inputs.DOCKER_DATABASE_IMAGE_VERSION }} +# run: touch ../.env && docker compose -f ../docker-compose.yml up -d db +# - name: Run tests +# env: +# OKTA_TESTING_DISABLEHTTPS: true +# TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }} +# TWILIO_AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }} +# run: ./gradlew jacocoTestReport -PtestDbPort=5432 +# - name: Cache backend coverage results +# uses: actions/cache@v3.3.2 +# with: +# path: backend/build/** +# key: ${{ runner.os }}-backend-coverage-${{ github.run_id }}-${{ github.run_attempt }} +# - name: Archive failed test results +# uses: actions/upload-artifact@v4 +# if: failure() +# with: +# name: backend-test-report +# path: backend/build/reports/tests/test +# retention-days: 7 +# frontend-tests: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: Use Node.js ${{ env.NODE_VERSION }} +# uses: actions/setup-node@v4.0.1 +# with: +# node-version: ${{ env.NODE_VERSION }} +# - name: Cache yarn +# uses: actions/cache@v3.3.2 +# with: +# path: ~/.cache/yarn +# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} +# - name: Node setup +# working-directory: ./frontend +# run: yarn install --prefer-offline +# - name: Run tests +# working-directory: ./frontend +# run: yarn test:ci +# - name: Cache frontend coverage results +# uses: actions/cache@v3.3.2 +# with: +# path: | +# frontend/coverage/** +# key: ${{ runner.os }}-frontend-coverage-${{ github.run_id }}-${{ github.run_attempt }} +# function-tests: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: "Function Apps: yarn install" +# working-directory: ./ops/services/app_functions/report_stream_batched_publisher/functions +# run: yarn +# - name: "Function Apps: Test" +# working-directory: ./ops/services/app_functions/report_stream_batched_publisher/functions +# run: yarn coverage +# - name: Cache function coverage results +# uses: actions/cache@v3.3.2 +# with: +# path: | +# ops/services/app_functions/report_stream_batched_publisher/functions/coverage/** +# key: ${{ runner.os }}-function-coverage-${{ github.run_id }}-${{ github.run_attempt }} +# - name: Archive function coverage results +# uses: actions/upload-artifact@v4 +# with: +# name: function-coverage +# path: ops/services/app_functions/report_stream_batched_publisher/functions/coverage +# sonar: +# needs: [backend-tests, frontend-tests, function-tests] +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# if: ${{ github.actor != 'dependabot[bot]' }} +# with: +# fetch-depth: 0 # Disable shallow clones so Sonar can have all the data +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any +# - name: Restore backend cache +# if: ${{ github.actor != 'dependabot[bot]' }} +# uses: actions/cache@v3.3.2 +# with: +# path: | +# backend/build/** +# key: ${{ runner.os }}-backend-coverage-${{ github.run_id }}-${{ github.run_attempt }} +# - name: Restore frontend cache +# if: ${{ github.actor != 'dependabot[bot]' }} +# uses: actions/cache@v3.3.2 +# with: +# path: | +# frontend/coverage/** +# key: ${{ runner.os }}-frontend-coverage-${{ github.run_id }}-${{ github.run_attempt }} +# - name: Restore functions cache +# if: ${{ github.actor != 'dependabot[bot]' }} +# uses: actions/cache@v3.3.2 +# with: +# path: | +# ops/services/app_functions/report_stream_batched_publisher/functions/coverage/** +# key: ${{ runner.os }}-function-coverage-${{ github.run_id }}-${{ github.run_attempt }} +# - name: Set up JDK +# uses: actions/setup-java@v4 +# with: +# java-version: ${{ env.JAVA_VERSION }} +# distribution: ${{ env.JAVA_DISTRIBUTION }} +# - name: Sonar analysis +# if: ${{ github.actor != 'dependabot[bot]' }} +# run: ./gradlew sonarqube -Dsonar.projectBaseDir=${{ env.PROJECT_ROOT }} --info +# env: +# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# build-jar: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: Set up JDK ${{ env.JAVA_VERSION }} +# uses: actions/setup-java@v4 +# with: +# java-version: ${{ env.JAVA_VERSION }} +# distribution: ${{ env.JAVA_DISTRIBUTION }} +# - name: Cache Java dependencies +# uses: actions/cache@v3.3.2 +# with: +# path: | +# ~/.gradle/caches +# ~/.gradle/wrapper +# key: gradle-${{ hashFiles('*.gradle', 'gradle/dependency-locks/*') }} +# - name: Run Java build +# run: ./gradlew assemble +# backend-lint: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: Set up JDK ${{ env.JAVA_VERSION }} +# uses: actions/setup-java@v4 +# with: +# java-version: ${{ env.JAVA_VERSION }} +# distribution: ${{ env.JAVA_DISTRIBUTION }} +# - name: Cache Java dependencies +# uses: actions/cache@v3.3.2 +# with: +# path: | +# ~/.gradle/caches +# ~/.gradle/wrapper +# key: gradle-${{ hashFiles('*.gradle', 'gradle/dependency-locks/*') }} +# - name: Run style checks +# run: ./gradlew checkstyleMain checkstyleTest spotlessCheck --continue +# frontend-lint-and-build: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: Use Node.js ${{ env.NODE_VERSION }} +# uses: actions/setup-node@v4.0.1 +# with: +# node-version: ${{ env.NODE_VERSION }} +# - name: Cache yarn +# uses: actions/cache@v3.3.2 +# with: +# path: ~/.cache/yarn +# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} +# restore-keys: | +# ${{ runner.os }}-yarn- +# - name: Node setup +# working-directory: ./frontend +# run: yarn +# - name: Lint front-end +# working-directory: ./frontend +# run: yarn lint +# - name: Build release +# working-directory: ./frontend +# run: yarn build diff --git a/.github/workflows/testingWorkflow.yml b/.github/workflows/testingWorkflow.yml index 4ac88d0558..596d57399a 100644 --- a/.github/workflows/testingWorkflow.yml +++ b/.github/workflows/testingWorkflow.yml @@ -25,7 +25,7 @@ permissions: packages: write jobs: -# Check for changes in the backend, cypress, database, frontend, and nginx directories + # Check for changes in the backend, cypress, database, frontend, and nginx directories workflow_changes: with: what_to_check: ./.github @@ -56,7 +56,7 @@ jobs: what_to_check: ./nginx uses: ./.github/workflows/checkForChanges.yml -# Build Docker Images for the backend, cypress, database, frontend, and nginx + # Build Docker Images for the backend, cypress, database, frontend, and nginx build_backend_image: if: needs.workflow_changes.outputs.has_changes == 'true' || needs.backend_changes.outputs.has_changes == 'true' || inputs.force_build == 'true' || github.ref == 'refs/heads/main' needs: @@ -165,36 +165,36 @@ jobs: "REACT_APP_OKTA_ENABLED=true" "REACT_APP_DISABLE_MAINTENANCE_BANNER=true" - build_frontend_lighthouse_image: - if: needs.workflow_changes.outputs.has_changes == 'true' || needs.frontend_changes.outputs.has_changes == 'true' || inputs.force_build == 'true' || github.ref == 'refs/heads/main' - needs: - - frontend_changes - - workflow_changes - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - platform: ${{ inputs.platform }} - outputs: - version: ${{ steps.set_frontend_lighthouse_version.outputs.version }} - steps: - - uses: actions/checkout@v4 - - name: Build Frontend Lighthouse Image - id: set_frontend_lighthouse_version - uses: ./.github/actions/docker-buildx - with: - file: ./frontend/Dockerfile - gh_username: ${{ github.actor }} - gh_token: ${{ secrets.GITHUB_TOKEN }} - image_name: frontend-lighthouse - platform: ${{ matrix.platform }} - 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" + # build_frontend_lighthouse_image: + # if: needs.workflow_changes.outputs.has_changes == 'true' || needs.frontend_changes.outputs.has_changes == 'true' || inputs.force_build == 'true' || github.ref == 'refs/heads/main' + # needs: + # - frontend_changes + # - workflow_changes + # runs-on: ubuntu-latest + # strategy: + # fail-fast: false + # matrix: + # include: + # - platform: ${{ inputs.platform }} + # outputs: + # version: ${{ steps.set_frontend_lighthouse_version.outputs.version }} + # steps: + # - uses: actions/checkout@v4 + # - name: Build Frontend Lighthouse Image + # id: set_frontend_lighthouse_version + # uses: ./.github/actions/docker-buildx + # with: + # file: ./frontend/Dockerfile + # gh_username: ${{ github.actor }} + # gh_token: ${{ secrets.GITHUB_TOKEN }} + # image_name: frontend-lighthouse + # platform: ${{ matrix.platform }} + # 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" build_nginx_image: if: needs.workflow_changes.outputs.has_changes == 'true' || needs.nginx_changes.outputs.has_changes == 'true' || inputs.force_build == 'true' || github.ref == 'refs/heads/main' @@ -221,7 +221,7 @@ jobs: image_name: nginx platform: ${{ matrix.platform }} -# Automated tests + # Automated tests e2e_local: if: | always() && !failure() && !cancelled()