🎒 Stores and retrieves documents and evidence
This project uses npm for dependency management.
- Install the project dependencies
npm install
- Set local environment variables, adjust as needed
cp .env.sample .env
- Start running your local copy of evidence store!
npm run dev
npm test # runs all unit tests
npm test:watch # runs all unit tests, in watch mode
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
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.
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!
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.