Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

🎒 Stores and retrieves documents and evidence

Notifications You must be signed in to change notification settings

LBHackney-IT/housing-needs-evidence-store

Repository files navigation

Evidence store

🎒 Stores and retrieves documents and evidence

CircleCI

Getting started

This project uses npm for dependency management.

  1. Install the project dependencies
    npm install
  2. Set local environment variables, adjust as needed
    cp .env.sample .env
  3. Start running your local copy of evidence store!
    npm run dev

Testing

Unit tests

npm test # runs all unit tests
npm test:watch # runs all unit tests, in watch mode

Integration tests

npm run test:integration

By default integration tests will run against the local version of evidence store, you can configure this to run against any URL by setting an environment variable before running the tests. If you are running tests against a real instance, you must also set INTEGRATION_TEST_JWT to a valid Hackney-issued JWT with appropriate permissions.

export INTEGRATION_TEST_BASE_URL=https://my.evidence.store/test
npm run test:integration

Deployment

A note about running this project locally

A key aspect of Evidence Store functionality is automatically indexing documents after they have been uploaded, this relies on an S3 event triggering a Lambda and therefore is very hard to test locally. If you are working on this functionality you may find it a lot easier to do a temporary deployment to AWS to test this integration.

Temporary personal deployments

You can deploy a temporary copy of the application, if you want to debug in a real AWS environment.

npm run deploy:personal
npm run deploy:personal:cleanup # remember to remove it when you're done!

Automated deployments

CircleCI will run unit and integration tests when a new PR is opened, these tests run against a test deployment of the application. This test environment is shared and therefore test runs will be queued when there are multiple PRs open at the same time to avoid conflicting deployments occurring.

Merging into master triggers a new deployment to staging, there is a manual approval process in CircleCI to trigger deployment to production.

About

🎒 Stores and retrieves documents and evidence

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published