Build environment with other CI tools
To integrate e2e test reports with the level ci backend, follow these steps:
1. Install the @level-ci/cli npm package
In the root of your project, install the package using npm (or another package manager such as yarn):
npm install --save-dev @level-ci/cliThe CLI is a command line interface tool that uploads reports generated by your end-to-end (e2e) test integration (configured separately) to the Level CI backend.
2. Create the Configuration File
Once installed, create a config file in the root of your project:
level-ci.config.ts
import type { Config } from '@level-ci/cli'
export default {
organization: 'your_organisation',
project: 'your_project',
token: process.env.LEVEL_CI_TOKEN,
reportPaths: ['./uw-a11y-reports'],
} satisfies Config3. Verify Configuration
Before committing changes to your repository, validate that your setup works correctly:
- Ensure all the changes above are in place.
- Run your e2e tests locally and confirm they pass.
- Run the following command in your terminal to verify your configuration:
npx level-ci --verify --token=<your_project_token>For troubleshooting, see the documentation.
4. Run @level-ci/cli
After running your e2e tests, upload reports to Level CI by running:
npx level-ci --token=<your_project_token>Make sure you checkout the correct branch before running this command.
Last updated on