More details about this plugin are available in the README.md file, that gets published here.
-
Install dependencies
yarn install
-
Build plugin in development mode and run in watch mode
yarn dev
-
Build plugin in production mode
yarn build
-
Run the tests (using Jest)
# Runs the tests and watches for changes, requires git init first yarn test # Exits after running all the tests, generates a coverage report yarn test:ci
-
Spin up a Grafana instance and run the plugin inside it (using Docker)
yarn server
-
Run the E2E tests (using Playwright)
# Runs in a Docker container for consistency, generates a coverage report yarn e2e
SEE: ./e2e/README.md
-
Update the E2E screenshots (using Playwright)
yarn e2e:update-screenshots
SEE: ./e2e/README.md
-
Run the linter
yarn lint # or yarn lint:fix
Publish (Plugins - CD)
- Update the version
- e.g, run
yarn version <major|minor|patch>
- e.g, run
- Update the CHANGELOG
- Commit and push changes, merge to
main
- Release and test plugin for
dev
environments:- Go to Plugins - CD and "Run workflow"
- Leave "use workflow from" as
main
- Choose
dev
as the environment to publish to - Choose
main
as the branch to publish from - It is possible to choose a PR for an earlier test on
dev
- Leave "use workflow from" as
- Manually test Evaluate the plugin from a dev environment
- Go to Plugins - CD and "Run workflow"
- Release and plugin for
prod
environments:- Go to Plugins - CD and "Run workflow"
- Leave "use workflow from" as
main
- Choose
prod
as the environment to publish to - Choose
main
as the branch to publish from
- Leave "use workflow from" as
- Go to Plugins - CD and "Run workflow"