Skip to content

Latest commit

 

History

History
62 lines (35 loc) · 3.5 KB

Readme.md

File metadata and controls

62 lines (35 loc) · 3.5 KB

Neracoos Mariner's Dashboard

Github Actions CI Codacy Badge Codacy Badge Storybook Docs

Using with Docker

If you have Docker installed and running, you can launch the app with make up and then access localhost:8100 to view.

When you're done making it more awesome run make down.

Deploying and Versioning

The site is deployed to the NERACOOS Digital Ocean Kubernetes Cluster.

To update the site, tag a commit with a version (v0.6.5). Github Actions will build and test the development image, then it will build the production image and push it to Docker Hub. Then it will update the manifest and image spec used by Argo CD in the neracoos-do-cd repo.

Once the Github Actions workflow completes for the tag, Argo CD will pick up the changes and sync the deployment (usually within 3 minutes).

Exception Tracking

We're tracking exceptions with Sentry.io and have Spotlight configured for development.

Spotlight requires a sidecar to run to capture and redirect exceptions to the front end. It can be run with make spotlight.

Sentry get's it's connection information from the NEXT_PUBLIC_SENTRY_DSN environment variable, which is included on build and in production.

Documentation

We're using Storybook for documentation.

Run make storybook to launch it locally, or view on Github Pages after a version tag builds.

Testing

Continuous Integration

Github Actions runs on each commit with unit, snapshot, and Playwright tests.

Codacy is also running code quality tests, along with collecting test coverage information.

Unit Tests

The jest test runner will start when you run make up and run tests on changed files automatically.

You can also run make cov to generate code coverage, and make cov-html to view the coverage in a browser.

Integration Tests

There are also integration tests that can be run with Playwright. This is does a full browser based test to make sure that data can be loaded.

To run, first start the app with make serve, then npm run test:e2e for headless tests, or npm run test:e2e:ui to view the browser testing.

Performance tests

Run make serve for a local test server, or kubectl -n mariners-dashboard-dev port-forward svc/mariners-dashboard 3000:80 to test against the dev server. Then run npm run test:speed to run performance tests.