Retrieve real-time data from your Nordic Semiconductor Development Kit within seconds.
Install the dependencies:
npm ci
npm start
End-to-end tests are run completely without a backend using Vite's built-in dev server to serve the data.
Deploy an instance of the
AWS Map resources and export the
map settings as environment variables MAP_REGION
, MAP_NAME
, and
MAP_API_KEY
before running it.
Note: It's currently not possible to run test for multiple browsers in parallel since the
webServer
> cannot be defined per project, and there is a state in the backend mock server that gets manipulated by the tests. So by default only thechrome
project is run
npm run test:e2e
npx playwright codegen
PWDEBUG=1 npx playwright test e2e-tests/
See ./e2e-tests/README.e2e-server.md
- register domain name, export as
DOMAIN_NAME
- create certificate in
us-east-1
region, export asCERTIFICATE_ID
npx cdk bootstrap
npx cdk deploy --all
Deploy https://github.com/hello-nrfcloud/aws-map and follow the instructions to acquire the necessary parameters to display the map.
Create a GitHub environment production
.
Store the registry endpoint as a GitHub Action variable:
gh variable set REGISTRY_ENDPOINT --env production --body "<registry endpoint>"
# If using a custom domain name
gh variable set DOMAIN_NAME --env production --body "<domain name>"
Store the role used for continuous deployment as a secret:
CD_ROLE_ARN=`aws cloudformation describe-stacks --stack-name ${STACK_NAME:-hello-nrfcloud-web} | jq -r '.Stacks[0].Outputs[] | select(.OutputKey == "gitHubCdRoleArn") | .OutputValue'`
gh secret set AWS_ROLE --env production --body "${CD_ROLE_ARN}"
Store the stack name and the region as a variable:
gh variable set STACK_NAME --env production --body "${STACK_NAME:-hello-nrfcloud-web}"
gh variable set AWS_REGION --env production --body "eu-west-1"
Deploy an instance of the AWS Map resources to the CI AWS account and store the map settings as variables:
# Make sure that the `ci` environment exists in this repo
gh variable set MAP_REGION --env ci --body "<mapRegion>"
gh variable set MAP_NAME --env ci --body "<mapName>"
gh variable set MAP_API_KEY --env ci --body "<apiKey>"