Attempting to work against staging API

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
Carlo Costino
2024-01-04 16:29:10 -05:00
parent 558296684c
commit b9a7e48e78

View File

@@ -15,7 +15,8 @@ env:
NODE_VERSION: 16.15.1 NODE_VERSION: 16.15.1
AWS_US_TOLL_FREE_NUMBER: "+18556438890" AWS_US_TOLL_FREE_NUMBER: "+18556438890"
ADMIN_BASE_URL: http://localhost:6012 ADMIN_BASE_URL: http://localhost:6012
API_HOST_NAME: http://localhost:6011 #API_HOST_NAME: http://localhost:6011
API_HOST_NAME: https://notify-api-staging.app.cloud.gov
jobs: jobs:
build: build:
@@ -56,67 +57,67 @@ jobs:
pull-requests: write pull-requests: write
contents: write contents: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
services: # services:
postgres: # postgres:
image: postgres # image: postgres
env: # env:
POSTGRES_USER: user # POSTGRES_USER: user
POSTGRES_PASSWORD: password # POSTGRES_PASSWORD: password
POSTGRES_DB: test_notification_api # POSTGRES_DB: test_notification_api
options: >- # options: >-
--health-cmd pg_isready # --health-cmd pg_isready
--health-interval 10s # --health-interval 10s
--health-timeout 5s # --health-timeout 5s
--health-retries 5 # --health-retries 5
ports: # ports:
# Maps tcp port 5432 on service container to the host # # Maps tcp port 5432 on service container to the host
- 5432:5432 # - 5432:5432
redis: # redis:
image: redis # image: redis
options: >- # options: >-
--health-cmd "redis-cli ping" # --health-cmd "redis-cli ping"
--health-interval 10s # --health-interval 10s
--health-timeout 5s # --health-timeout 5s
--health-retries 5 # --health-retries 5
ports: # ports:
# Maps tcp port 6379 on service container to the host # # Maps tcp port 6379 on service container to the host
- 6379:6379 # - 6379:6379
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: ./.github/actions/setup-project - uses: ./.github/actions/setup-project
- uses: jwalton/gh-find-current-pr@v1 - uses: jwalton/gh-find-current-pr@v1
id: findPr id: findPr
- name: Clone API # - name: Clone API
uses: actions/checkout@v3 # uses: actions/checkout@v3
with: # with:
repository: GSA/notifications-api # repository: GSA/notifications-api
path: 'notifications-api' # path: 'notifications-api'
- name: Install API dependencies # - name: Install API dependencies
working-directory: 'notifications-api' # working-directory: 'notifications-api'
run: make bootstrap # run: make bootstrap
env: # env:
DATABASE_URL: postgresql://user:password@localhost:5432/test_notification_api # DATABASE_URL: postgresql://user:password@localhost:5432/test_notification_api
SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api # SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api
REDIS_URL: redis://localhost:6379 # REDIS_URL: redis://localhost:6379
NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }} # NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }}
NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }} # NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }}
NOTIFY_ENVIRONMENT: development # NOTIFY_ENVIRONMENT: development
- name: Run API server # - name: Run API server
working-directory: 'notifications-api' # working-directory: 'notifications-api'
run: make run-procfile & # run: make run-procfile &
env: # env:
DATABASE_URL: postgresql://user:password@localhost:5432/test_notification_api # DATABASE_URL: postgresql://user:password@localhost:5432/test_notification_api
SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api # SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api
REDIS_URL: redis://localhost:6379 # REDIS_URL: redis://localhost:6379
NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }} # NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }}
NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }} # NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }}
NOTIFY_ENVIRONMENT: development # NOTIFY_ENVIRONMENT: development
- name: Run Admin server - name: Run Admin server
run: make run-flask & run: make run-flask &
- name: Run E2E tests - name: Run E2E tests
run: poetry run pytest -v --browser chromium --browser firefox --browser webkit tests/end_to_end # run: poetry run pytest -v --browser chromium --browser firefox --browser webkit tests/end_to_end
# Debugging for now to troubleshoot a connectivity issue to the local servers # Debugging for now to troubleshoot a connectivity issue to the local servers
# run: curl --request GET --url "http://localhost:6012" run: curl --request GET --url "http://localhost:6012"
env: env:
NOTIFY_E2E_AUTH_STATE_PATH: ${{ secrets.NOTIFY_E2E_AUTH_STATE_PATH }} NOTIFY_E2E_AUTH_STATE_PATH: ${{ secrets.NOTIFY_E2E_AUTH_STATE_PATH }}
NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }} NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }}