diff --git a/.github/workflows/testing-from-build.yml b/.github/workflows/testing-from-build.yml index 790fa2164f..5b4f48bf8d 100644 --- a/.github/workflows/testing-from-build.yml +++ b/.github/workflows/testing-from-build.yml @@ -11,11 +11,11 @@ jobs: env: ENV: TESTING SAM_API_KEY: ${{ secrets.SAM_API_KEY }} - DJANGO_BASE_URL: 'http://localhost:8000' + DJANGO_BASE_URL: "http://localhost:8000" DJANGO_SECRET_LOGIN_KEY: ${{ secrets.DJANGO_SECRET_LOGIN_KEY }} LOGIN_CLIENT_ID: ${{ secrets.LOGIN_CLIENT_ID }} SECRET_KEY: ${{ secrets.SECRET_KEY }} - ALLOWED_HOSTS: '0.0.0.0 127.0.0.1 localhost' + ALLOWED_HOSTS: "0.0.0.0 127.0.0.1 localhost" DISABLE_AUTH: False steps: - name: Checkout @@ -39,8 +39,7 @@ jobs: - name: Run Django test suite working-directory: ./backend - run: - docker compose -f docker-compose.yml run web bash -c 'coverage run --parallel-mode --concurrency=multiprocessing manage.py test --parallel && coverage combine && coverage report -m --fail-under=90 && coverage xml -o coverage.xml' + run: docker compose -f docker-compose.yml run web bash -c 'coverage run --parallel-mode --concurrency=multiprocessing manage.py test --parallel && coverage combine && coverage report -m --fail-under=90 && coverage xml -o coverage.xml' - name: Copy Coverage From Docker Container run: | @@ -58,31 +57,31 @@ jobs: show_missing: true repo_token: ${{ secrets.GITHUB_TOKEN }} - a11y-testing: - runs-on: ubuntu-latest - env: - ENV: TESTING - SAM_API_KEY: ${{ secrets.SAM_API_KEY }} - DJANGO_BASE_URL: 'http://localhost:8000' - DJANGO_SECRET_LOGIN_KEY: ${{ secrets.DJANGO_SECRET_LOGIN_KEY }} - LOGIN_CLIENT_ID: ${{ secrets.LOGIN_CLIENT_ID }} - SECRET_KEY: ${{ secrets.SECRET_KEY }} - ALLOWED_HOSTS: '0.0.0.0 127.0.0.1 localhost' - DISABLE_AUTH: True - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 - with: - node-version: 18 - - name: Start services - working-directory: ./backend - run: | - touch .env - docker compose -f docker-compose.yml up -d - - - name: Run Lighthouse CI and pa11y - working-directory: ./backend - run: | - sudo npm ci - npm run test:a11y:lighthouse - npm run test:a11y:pa11y + # a11y-testing: + # runs-on: ubuntu-latest + # env: + # ENV: TESTING + # SAM_API_KEY: ${{ secrets.SAM_API_KEY }} + # DJANGO_BASE_URL: "http://localhost:8000" + # DJANGO_SECRET_LOGIN_KEY: ${{ secrets.DJANGO_SECRET_LOGIN_KEY }} + # LOGIN_CLIENT_ID: ${{ secrets.LOGIN_CLIENT_ID }} + # SECRET_KEY: ${{ secrets.SECRET_KEY }} + # ALLOWED_HOSTS: "0.0.0.0 127.0.0.1 localhost" + # DISABLE_AUTH: True + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-node@v3 + # with: + # node-version: 18 + # - name: Start services + # working-directory: ./backend + # run: | + # touch .env + # docker compose -f docker-compose.yml up -d + # + # - name: Run Lighthouse CI and pa11y + # working-directory: ./backend + # run: | + # sudo npm ci + # npm run test:a11y:lighthouse + # npm run test:a11y:pa11y diff --git a/.github/workflows/testing-from-ghcr.yml b/.github/workflows/testing-from-ghcr.yml index b74202d525..e58d47c4d3 100644 --- a/.github/workflows/testing-from-ghcr.yml +++ b/.github/workflows/testing-from-ghcr.yml @@ -11,11 +11,11 @@ jobs: env: ENV: TESTING SAM_API_KEY: ${{ secrets.SAM_API_KEY }} - DJANGO_BASE_URL: 'http://localhost:8000' + DJANGO_BASE_URL: "http://localhost:8000" DJANGO_SECRET_LOGIN_KEY: ${{ secrets.DJANGO_SECRET_LOGIN_KEY }} LOGIN_CLIENT_ID: ${{ secrets.LOGIN_CLIENT_ID }} SECRET_KEY: ${{ secrets.SECRET_KEY }} - ALLOWED_HOSTS: '0.0.0.0 127.0.0.1 localhost' + ALLOWED_HOSTS: "0.0.0.0 127.0.0.1 localhost" DISABLE_AUTH: False PGRST_JWT_SECRET: ${{ secrets.PGRST_JWT_SECRET }} steps: @@ -59,30 +59,30 @@ jobs: show_missing: true repo_token: ${{ secrets.GITHUB_TOKEN }} - a11y-testing: - runs-on: ubuntu-latest - env: - ENV: TESTING - SAM_API_KEY: ${{ secrets.SAM_API_KEY }} - DJANGO_BASE_URL: 'http://localhost:8000' - DJANGO_SECRET_LOGIN_KEY: ${{ secrets.DJANGO_SECRET_LOGIN_KEY }} - LOGIN_CLIENT_ID: ${{ secrets.LOGIN_CLIENT_ID }} - SECRET_KEY: ${{ secrets.SECRET_KEY }} - ALLOWED_HOSTS: '0.0.0.0 127.0.0.1 localhost' - DISABLE_AUTH: True - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v3 - with: - node-version: 16 - - name: Start services - working-directory: ./backend - run: | - touch .env - docker compose -f docker-compose.yml up -d - - name: Run Lighthouse CI and pa11y - working-directory: ./backend - run: | - sudo npm ci - npm run test:a11y:lighthouse - npm run test:a11y:pa11y + # a11y-testing: + # runs-on: ubuntu-latest + # env: + # ENV: TESTING + # SAM_API_KEY: ${{ secrets.SAM_API_KEY }} + # DJANGO_BASE_URL: "http://localhost:8000" + # DJANGO_SECRET_LOGIN_KEY: ${{ secrets.DJANGO_SECRET_LOGIN_KEY }} + # LOGIN_CLIENT_ID: ${{ secrets.LOGIN_CLIENT_ID }} + # SECRET_KEY: ${{ secrets.SECRET_KEY }} + # ALLOWED_HOSTS: "0.0.0.0 127.0.0.1 localhost" + # DISABLE_AUTH: True + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-node@v3 + # with: + # node-version: 16 + # - name: Start services + # working-directory: ./backend + # run: | + # touch .env + # docker compose -f docker-compose.yml up -d + # - name: Run Lighthouse CI and pa11y + # working-directory: ./backend + # run: | + # sudo npm ci + # npm run test:a11y:lighthouse + # npm run test:a11y:pa11y diff --git a/backend/.profile b/backend/.profile index 81c779170f..08ff1172cc 100644 --- a/backend/.profile +++ b/backend/.profile @@ -28,7 +28,7 @@ export NEW_RELIC_ENVIRONMENT="$(echo "$VCAP_APPLICATION" | jq -r .space_name)" export NEW_RELIC_LOG=stdout # Logging level, (critical, error, warning, info and debug). Default to info -#export NEW_RELIC_LOG_LEVEL= +export NEW_RELIC_LOG_LEVEL=debug # https://docs.newrelic.com/docs/security/security-privacy/compliance/fedramp-compliant-endpoints/ export NEW_RELIC_HOST="gov-collector.newrelic.com" @@ -37,7 +37,8 @@ https_proxy_protocol="$(echo "$VCAP_SERVICES" | jq --raw-output --arg service_na https_proxy_domain="$(echo "$VCAP_SERVICES" | jq --raw-output --arg service_name "https-proxy-creds" ".[][] | select(.name == \$service_name) | .credentials.domain")" https_proxy_port="$(echo "$VCAP_SERVICES" | jq --raw-output --arg service_name "https-proxy-creds" ".[][] | select(.name == \$service_name) | .credentials.port")" -export NEW_RELIC_PROXY_HOST="$https_proxy_protocol://$https_proxy_domain:$https_proxy_port" +export NEW_RELIC_PROXY_HOST="$https_proxy_protocol://$https_proxy_domain" +export NEW_RELIC_PROXY_PORT="$https_proxy_port" export NEW_RELIC_PROXY_USER="$(echo "$VCAP_SERVICES" | jq --raw-output --arg service_name "https-proxy-creds" ".[][] | select(.name == \$service_name) | .credentials.username")" export NEW_RELIC_PROXY_PASS="$(echo "$VCAP_SERVICES" | jq --raw-output --arg service_name "https-proxy-creds" ".[][] | select(.name == \$service_name) | .credentials.password")"