Setup
Install the Sprkl Reviewer app from the GitHub marketplace and follow the instructions, and receive an access token.

GitHub Marketplace

Get your token from Sprkl
1. Open your repo on GitHub.
2. Go to Settings

3. Then, go to Secrets

4. in Action, select New Repository Secret

Enter the token provided to you by Sprkl under any name you'd like.

- name: Sprkl Setup
uses: sprkl-dev/sprkl-action/[email protected]
with:
token: ${{ secrets.SPRKL_GITHUB_ACTIONS_TOKEN }}
Since Sprkl analyzes your git history (Why?) during the workflow, so make sure to include it in your action by setting
fetch-depth: 0
in actions/checkout. - uses: actions/[email protected]
with:
fetch-depth: 0
- name: Sprkl Setup
uses: sprkl-dev/sprkl-action/[email protected]
with:
token: ${{ secrets.SPRKL_GITHUB_ACTIONS_TOKEN }}
Details are down below.
# Modify the checkout step to use "fetch-depth: 0",
# which fetches all the git history into that workflow.
- uses: actions/[email protected]
with:
fetch-depth: 0
# Setup Sprkl CLI in the workflow
- name: Sprkl Setup
uses: sprkl-dev/sprkl-action/[email protected]
with:
token: ${{ secrets.SPRKL_GITHUB_ACTIONS_TOKEN }}
# `sprkl` is now available throughout the entire workflow.
- name: Install
run: npm install
- name: Test
run: sprkl -- npm test
Follow the example action in the sprkl example repository - a real use-case of microservices e-commerce.
Last modified 30d ago