Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2023-10-19 main -> prod #2557

Merged
merged 2 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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