Brisk CI is a custom Github Action that you can add to your repository. It will run on every push to your repository and will run your tests.
To get started, create a new file in your repository called
.github/workflows/brisk_ci.yml
and add the following contents:
name: Brisk CI on: [push] jobs: Brisk-CI: runs-on: ubuntu-latest steps: - name: Check out repository code uses: actions/checkout@v3 - name: Install Brisk uses: brisktest/setup-brisk@v1.1 with: brisk_version: 'latest' api_token: '${{ secrets.BRISK_APITOKEN }}' api_key: '${{ secrets.BRISK_APIKEY }}' config_file: 'brisk-ci.json' - name: Run Brisk run: brisk
You will need to get an API key and API token from Brisk. You can either do that using the CLI or from this website.
We recommend using the CLI as you can then run the tests locally and make sure they work before pushing to Github. You will also be able to run tests locally without having to push to Github.
However if you want to run the github action at the same time as pre-commit tests you will need to configure a seperate project (again you can do this using the CLI). The most straightforward way is to use a seperate project file for the github action. In the example above we have called this file "brisk-ci.json" and it contains the configuration specific to the github action. Below you will see more information on setting up your project and logging in.
First thing you will need to do is download the binary for your architecture and os. Linux and OSX are available here, reach out to us at support if you need other platforms and we can build it for you.
Download the binary and move it to your PATH, usually in the /usr/local/bin directory.
If you haven't already, create an account on this site. You will need this in order to create a project and run your tests.
Make sure and confirm your account by clicking the link in the email we send you.
Run the command
brisk login
This will open a web browser and log in to your account on brisktest.com. It will download your credentials and store them in your home directory. The default location for the config file is
~/.config/brisk/config.toml
In the root directory of your project run the command
brisk project init rails
To create a new Rails project.
Or run the command
brisk project init jest
To create a new Jest project.
This command will create a new project on brisktest.com and initialize a brisk.json file in your project directory with default values and your project information.
The project will be on the free plan to begin. You can always upgrade to a paid plan later if you need additional concurrency. The free plan does have 5X concurrency so you should be able to see significant speed improvements.
The configuration will work with a barebones vanilla project, but you will probably need to add build steps and other configuration for your specific project.
The command
brisk
In your project root without additional commands starts brisk and executes your first run.
We are happy to help you get started. Email us at support@brisktest.com with any questions you might have and we'll respond as quickly as possible.