Skip to content
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
47 changes: 47 additions & 0 deletions .github/workflows/pr-env-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,53 @@ jobs:
- name: Run Integration Tests
run: make test-features-integration TF_WORKSPACE_NAME=${{ needs.set-environment-id.outputs.environment_id }}

smoke-test:
name: Run Smoke Tests
needs: [set-environment-id, integration-test]
environment: pull-request
runs-on: [self-hosted, ci]
steps:
- name: Git Clone - ${{ github.event.pull_request.head.ref }}
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Setup asdf cache
uses: actions/cache@v4
with:
path: ~/.asdf
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}
restore-keys: |
${{ runner.os }}-asdf-

- name: Install asdf and tools
uses: asdf-vm/actions/install@v3.0.2
with:
asdf_branch: v0.13.1

- name: Setup Python environment
run: |
poetry install --no-root
source $(poetry env info --path)/bin/activate

- name: Configure Management Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-2
role-to-assume: ${{ secrets.MGMT_ROLE_ARN }}
role-session-name: github-actions-ci-${{ needs.set-environment-id.outputs.environment_id }}

- name: Terraform Init
run: |
terraform -chdir=terraform/infrastructure init
terraform -chdir=terraform/infrastructure workspace new ${{ needs.set-environment-id.outputs.environment_id }} || \
terraform -chdir=terraform/infrastructure workspace select ${{ needs.set-environment-id.outputs.environment_id }}

- name: Smoke Test
run: |
make ENV=dev truststore-pull-client
make ENV=dev TF_WORKSPACE_NAME=${{ needs.set-environment-id.outputs.environment_id }} test-smoke-internal

performance-test:
name: Run Performance Tests
needs: [set-environment-id, integration-test]
Expand Down
24 changes: 22 additions & 2 deletions tests/smoke/setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from nrlf.core.constants import Categories, PointerTypes
from nrlf.core.constants import TYPE_ATTRIBUTES, Categories, PointerTypes
from nrlf.producer.fhir.r4.model import (
Attachment,
CodeableConcept,
Coding,
DocumentReference,
DocumentReferenceContent,
DocumentReferenceContext,
DocumentReferenceRelatesTo,
Identifier,
Reference,
Expand Down Expand Up @@ -35,7 +36,15 @@ def build_document_reference(
)
],
type=CodeableConcept(
coding=[Coding(system="http://snomed.info/sct", code=type)]
coding=[
Coding(
system="http://snomed.info/sct",
code=type,
display=TYPE_ATTRIBUTES.get(f"http://snomed.info/sct|{type}").get(
"display"
),
)
]
),
subject=Reference(
identifier=Identifier(
Expand Down Expand Up @@ -67,6 +76,17 @@ def build_document_reference(
]
)
],
context=DocumentReferenceContext(
practiceSetting=CodeableConcept(
coding=[
Coding(
system="http://snomed.info/sct",
code="390826005",
display="Mental health caregiver support",
)
]
)
),
)

if replaces_id:
Expand Down