Quick Start ⏱️

Install
Set up the Redefine CLI tool in your CI environment by copy-pasting the code below.
pip install -U redefine
Configure
Set up the authentication key
Store the Redefine authentication key in your CI system by following the recommended best practices for your specific CI platform: GitHub Actions, GitLab CI, Jenkins, CircleCI, Buildkite, or TeamCity. Once stored, you can export the authentication key to the Redefine CLI by setting the environment variable as REDEFINE_AUTH
. This ensures that the CLI can access the authentication key securely and use it for authentication purposes.
Additional Configurations
Verify
Once Redefine has been installed and configured, make sure that everything is working properly by running the verify
command. This command verifies whether your CI environment is compatible with Redefine, and returns a success message if all is good or an error message detailing any issues that need fixing. To run the command, follow these steps:
redefine verify --pytest
Run in Discover Mode
With Discover mode, Redefine analyzes your coding patterns and test results to create the initial test optimization model. To start the discovery process, simply replace the verify
command from the previous step with the following command:
redefine install --discover --pytest
Examples
The following examples show the final Redefine for development environments setup using pytest
. This gives an idea of what your configuration should look like once everything is in place.
- name: Redefine GitHub Action
id: run_redefine
uses: redefinedev/redefine-action@main
with:
auth: ${{ secrets.REDEFINE_AUTH_KEY }}
testing-framework: pytest
mode: discover
- name: Test with pytest
id: pytest
run: pytest tests
For all the GitHub Action options see the action's docs.
Tracking the discovery progress
Monitor the progress of the discovery process and verify the data using the Redefine Onboarding Wizard, which offers a user-friendly way to track the process and ensure accurate results.
Last updated