Added persistent store vars to automated scripts #4571
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: functest | |
on: [push] | |
jobs: | |
run-functests: | |
permissions: | |
id-token: write # This is required for requesting the JWT for gaining permissions to assume the IAM role to perform AWS actions | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- uses: actions/setup-python@v4 | |
name: setup python | |
with: | |
python-version: 3.8 | |
- name: AWS credentials configuration | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: ${{secrets.GH_ACTIONS_AWS_ROLE}} | |
role-session-name: gh-actions-${{github.run_id}}.${{github.run_number}}.${{github.run_attempt}}-functest | |
aws-region: us-east-1 | |
- name: Amazon ECR login | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
- name: run func tests | |
env: | |
ENV_STATE: test | |
HOST: 0.0.0.0 | |
PSQL_USERNAME: postgres | |
PSQL_PASSWORD: postgres | |
PSQL_HOST: postgres | |
PSQL_PORT: 5433 | |
PSQL_DATABASE: literature-test | |
OKTA_CLIENT_ID: ${{ secrets.okta_client_id }} | |
OKTA_CLIENT_SECRET: ${{ secrets.okta_client_secret }} | |
RESOURCE_DESCRIPTOR_URL: 'https://raw.githubusercontent.com/alliance-genome/agr_schemas/master/resourceDescriptors.yaml' | |
OKTA_DOMAIN: 'dev-30456587.okta.com/oauth2/default' | |
OKTA_API_AUDIENCE: 'api://default' | |
run: | | |
docker compose --env-file .env.test down | |
docker compose --env-file .env.test up -d postgres | |
sleep 5 | |
docker compose --env-file .env.test build test_runner | |
docker compose --env-file .env.test build dev_app | |
docker compose --env-file .env.test run --rm dev_app sh tests/init_test_db.sh | |
docker compose --env-file .env.test run test_runner python3 agr_literature_service/lit_processing/tests/functional_tests.py | |
docker compose --env-file .env.test down |