Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c9c7c1a
1st go at adding spike code to the real repo.
acerathereinspirative-nhs-nvir Mar 6, 2025
2642c2b
Does this stop the false positives in scan-secrets?
acerathereinspirative-nhs-nvir Mar 6, 2025
6316350
Does this give our test coverage to sonar?
acerathereinspirative-nhs-nvir Mar 10, 2025
166ee7a
Add inclusions & exclusions
acerathereinspirative-nhs-nvir Mar 10, 2025
188f84b
Upload coverage from unit tests, use that for coverage report.
acerathereinspirative-nhs-nvir Mar 10, 2025
376ad46
Build and upload lambda artefact.
acerathereinspirative-nhs-nvir Mar 10, 2025
676a402
Download lambda artefact for integration tests.
acerathereinspirative-nhs-nvir Mar 10, 2025
8cc6375
Is the lambda call just slow, or not working at all?
acerathereinspirative-nhs-nvir Mar 10, 2025
e14e6ff
Use localhost for dynamodb connection when running lambda and dynamod…
acerathereinspirative-nhs-nvir Mar 11, 2025
ddeb7cf
Try fiddling with docker network settings. This is tiresome.
acerathereinspirative-nhs-nvir Mar 11, 2025
b04880c
Try fiddling with docker network settings. This is tiresome.
acerathereinspirative-nhs-nvir Mar 11, 2025
813e9bd
Merge remote-tracking branch 'origin/main' into move-skipe-code-into-…
acerathereinspirative-nhs-nvir Mar 11, 2025
534838b
Use fakers to build people details in test builder. in
acerathereinspirative-nhs-nvir Mar 11, 2025
3dfd25b
Try getting ServiceResource from boto3.Session instead of instantiati…
acerathereinspirative-nhs-nvir Mar 11, 2025
0bdc1f6
Try getting ServiceResource from boto3.Session instead of instantiati…
acerathereinspirative-nhs-nvir Mar 11, 2025
715642a
Create boto3.Session using factory.
acerathereinspirative-nhs-nvir Mar 11, 2025
62019c6
Add qualifiers to service which mey bo only one of a given type.
acerathereinspirative-nhs-nvir Mar 11, 2025
11b0f8f
Try running localhost using the action localstack provides, rather th…
acerathereinspirative-nhs-nvir Mar 11, 2025
0a192c5
Try using fixture request to make sure docker only starts if it's nee…
acerathereinspirative-nhs-nvir Mar 11, 2025
da785c5
Try original dynamodb endpoint for lambda <-> connection.
acerathereinspirative-nhs-nvir Mar 12, 2025
fae4d9c
Try http://localstack:4566/, and log some info during the integration…
acerathereinspirative-nhs-nvir Mar 12, 2025
b18105b
Trl local executor again.
acerathereinspirative-nhs-nvir Mar 12, 2025
e412b83
Try http://localstack:4566/ with local executor.
acerathereinspirative-nhs-nvir Mar 12, 2025
3482183
Try http://host.docker.internal:4566 with local executor.
acerathereinspirative-nhs-nvir Mar 12, 2025
0a6c4b8
Try http://host.docker.internal:4566 with extra-hosts
acerathereinspirative-nhs-nvir Mar 12, 2025
8bf173d
Skip integration tests for now. We need a rethink.
acerathereinspirative-nhs-nvir Mar 12, 2025
ba64129
Merge remote-tracking branch 'origin/main' into move-skipe-code-into-…
acerathereinspirative-nhs-nvir Mar 12, 2025
3e08402
Remove unnecessary lint rule exclusion.
acerathereinspirative-nhs-nvir Mar 12, 2025
4443307
Karthik's fix for integration tests.
acerathereinspirative-nhs-nvir Mar 12, 2025
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
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ USE_SSL=0
# Optional CORS Headers and Origins
EXTRA_CORS_ALLOWED_HEADERS=
EXTRA_CORS_ALLOWED_ORIGINS=

DOCKER_HOST="unix://$HOME/.colima/docker.sock"
30 changes: 9 additions & 21 deletions .github/workflows/stage-2-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ jobs:
- name: "Run unit test suite"
run: |
make test-unit
- name: "Save the result of fast test suite"
run: |
echo "Nothing to save"
- name: "Save the coverage check result"
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.xml
test-lint:
name: "Linting"
runs-on: ubuntu-latest
Expand All @@ -67,24 +69,6 @@ jobs:
- name: "Save the linting result"
run: |
echo "Nothing to save"
test-coverage:
name: "Test coverage"
needs: [test-unit]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: "Run test coverage check"
run: |
make test-coverage
- name: "Save the coverage check result"
run: |
echo "Nothing to save"
perform-static-analysis:
name: "Perform static analysis"
needs: [test-unit]
Expand All @@ -98,6 +82,10 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history is needed to improving relevancy of reporting
- name: "Get the coverage report"
uses: actions/download-artifact@v4
with:
name: coverage
- name: "Perform static analysis"
uses: ./.github/actions/perform-static-analysis
with:
Expand Down
43 changes: 15 additions & 28 deletions .github/workflows/stage-3-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,37 +33,24 @@ on:
type: string

jobs:
artefact-1:
name: "Artefact 1"
lambda-artefact:
name: "Lambda Artefact"
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Build artefact 1"
- name: "Build lambda artefact"
run: |
echo "Building artefact 1 ..."
- name: "Check artefact 1"
run: |
echo "Checking artefact 1 ..."
- name: "Upload artefact 1"
run: |
echo "Uploading artefact 1 ..."
# TODO: Use either action/cache or action/upload-artifact
artefact-2:
name: "Artefact 2"
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Build artefact 2"
run: |
echo "Building artefact 2 ..."
- name: "Check artefact 2"
run: |
echo "Checking artefact 2 ..."
- name: "Upload artefact 2"
run: |
echo "Uploading artefact 2 ..."
# TODO: Use either action/cache or action/upload-artifact
make dependencies install-python
poetry self add poetry-plugin-lambda-build poetry-plugin-export
make build
- name: "Upload lambda artefact"
uses: actions/upload-artifact@v4
with:
name: lambda
path: dist/lambda.zip
7 changes: 7 additions & 0 deletions .github/workflows/stage-4-acceptance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,20 @@ jobs:
runs-on: ubuntu-latest
needs: environment-set-up
timeout-minutes: 10
env:
LOCALSTACK_INTERNAL_DYNAMODB_ENDPOINT: http://localstack:4566/
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: "Get lambda artefact"
uses: actions/download-artifact@v4
with:
name: lambda
path: dist
- name: "Run integration test"
run: |
make test-integration
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ test-report.xml
.coverage

localstack_data/
/volume/*
/coverage.xml
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ install: install-node install-python .git/hooks/pre-commit

#Run the npm linting script (specified in package.json). Used to check the syntax and formatting of files.
lint:
npm run lint
# npm run lint
poetry run ruff format . --check
poetry run ruff check .
poetry run pyright
Expand All @@ -45,8 +45,8 @@ _dist_include="pytest.ini poetry.lock poetry.toml pyproject.toml Makefile build/
dependencies: # Install dependencies needed to build and test the project @Pipeline
scripts/dependencies.sh

build: # Build the project artefact @Pipeline
# TODO: Implement the artefact build step
build: # Build lambda in dist
poetry build-lambda -vv

publish: # Publish the project artefact @Pipeline
# TODO: Implement the artefact publishing step
Expand All @@ -58,7 +58,8 @@ config:: # Configure development environment (main) @Configuration
# TODO: Use only 'make' targets that are specific to this project, e.g. you may not need to install Node.js
make _install-dependencies

precommit: lint test ## Pre-commit tasks
precommit: test-unit build test-integration lint ## Pre-commit tasks
python -m this

# ==============================================================================

Expand Down
Loading
Loading