|
| 1 | +name: Run e2e tests |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - VED-358-github-actions |
| 6 | + |
| 7 | +jobs: |
| 8 | + e2e-tests: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + permissions: |
| 11 | + id-token: write |
| 12 | + contents: read |
| 13 | + steps: |
| 14 | + - name: Checkout |
| 15 | + uses: actions/checkout@v4 |
| 16 | + |
| 17 | + - uses: aws-actions/configure-aws-credentials@v4 |
| 18 | + with: |
| 19 | + aws-region: eu-west-2 |
| 20 | + role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/auto-ops |
| 21 | + role-session-name: github-actions |
| 22 | + |
| 23 | + - name: Whoami |
| 24 | + run: aws sts get-caller-identity |
| 25 | + |
| 26 | + - name: Set up Python |
| 27 | + uses: actions/setup-python@v5 |
| 28 | + with: |
| 29 | + python-version: "3.11" |
| 30 | + |
| 31 | + - name: Install Poetry |
| 32 | + run: | |
| 33 | + curl -sSL https://install.python-poetry.org | python3 - |
| 34 | + echo "$HOME/.local/bin" >> $GITHUB_PATH |
| 35 | +
|
| 36 | + - name: Set Poetry to use Python 3.11 |
| 37 | + working-directory: ${{ vars.E2E_DIR_PATH }} |
| 38 | + run: | |
| 39 | + poetry env use $(which python3.11) |
| 40 | +
|
| 41 | + - name: Install dependencies with Poetry |
| 42 | + working-directory: ${{ vars.E2E_DIR_PATH }} |
| 43 | + run: | |
| 44 | + poetry install --no-root |
| 45 | +
|
| 46 | + - name: Run e2e tests |
| 47 | + working-directory: ${{ vars.E2E_DIR_PATH }} |
| 48 | + run: | |
| 49 | + apigee_token=$(aws ssm get-parameter \ |
| 50 | + --name "/imms/apigee/non-prod/token" \ |
| 51 | + --with-decryption \ |
| 52 | + --query "Parameter.Value" \ |
| 53 | + --output text) |
| 54 | +
|
| 55 | + status_api_key=$(aws ssm get-parameter \ |
| 56 | + --name "/imms/apigee/non-prod/status-api-key" \ |
| 57 | + --with-decryption \ |
| 58 | + --query "Parameter.Value" \ |
| 59 | + --output text) |
| 60 | +
|
| 61 | + export APIGEE_ACCESS_TOKEN=$apigee_token |
| 62 | + |
| 63 | + export APIGEE_ENVIRONMENT=int |
| 64 | + export STATUS_API_KEY=$status_api_key |
| 65 | + export PROXY_NAME=immunisation-fhir-api-internal-dev |
| 66 | + export SERVICE_BASE_PATH=immunisation-fhir-api/FHIR/R4 |
| 67 | + export SSO_LOGIN_URL=https://login.apigee.com |
| 68 | +
|
| 69 | + make run-immunization |
0 commit comments