-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (47 loc) · 1.96 KB
/
functest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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