Skip to content

Commit

Permalink
Merge pull request #2557 from GSA-TTS/main
Browse files Browse the repository at this point in the history
2023-10-19 main -> prod
  • Loading branch information
danswick authored Oct 19, 2023
2 parents 94ed07b + a3bd0cf commit a3666d0
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 63 deletions.
63 changes: 31 additions & 32 deletions .github/workflows/testing-from-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand All @@ -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
58 changes: 29 additions & 29 deletions .github/workflows/testing-from-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
5 changes: 3 additions & 2 deletions backend/.profile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")"

Expand Down

0 comments on commit a3666d0

Please sign in to comment.