Sprkl Docs
SupportSprkl websiteJoin Sprkl betaJoin Sprkl for CI
0.0.63
0.0.63
  • What is Sprkl?
  • Getting started
    • Install Sprkl
    • Instrument your code
      • Bare metal
      • Docker
      • Kubernetes
    • Start with a sample project with Docker Compose
  • Features
    • Dashboard
      • Personal vs. Global
      • Code Block Reference
    • Code markups
    • System Graph
    • Jaeger tracing
    • Jest integration
    • New! Detect runtime security vulnerabilities in your code
  • Integrations and supported stack
  • Concepts
    • Analysis
    • Instrumentation
    • Aggregations, metrics and insights
  • FAQ
  • Support
  • Sprkl for GitHub Actions
    • Overview
    • Setup
    • Pulling Sprkl data to your IDE for further debugging
  • Troubleshooting
Powered by GitBook
On this page
  • Sprkl Reviewer
  • Add the token as a secret to your repository
  • Sprkl Action
  • Setup Sprkl in your GitHub Workflow
  1. Sprkl for GitHub Actions

Setup

PreviousOverviewNextPulling Sprkl data to your IDE for further debugging

Last updated 2 years ago

Sprkl Reviewer

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

Add the token as a secret to your repository

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.

Sprkl Action

Setup Sprkl in your GitHub Workflow

Add the following step to make Sprkl CLI available in your workflow:

      - name: Sprkl Setup
        uses: sprkl-dev/sprkl-action/setup@master
        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/checkout@v3
        with:
          fetch-depth: 0
          
      - name: Sprkl Setup
        uses: sprkl-dev/sprkl-action/setup@master
        with:
          token: ${{ secrets.SPRKL_GITHUB_ACTIONS_TOKEN }}

Get your token by setting up the Sprkl Reviewer.

Details are down below.

Example

     
      # Modify the checkout step to use "fetch-depth: 0",
      # which fetches all the git history into that workflow.
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
          

      # Setup Sprkl CLI in the workflow
      - name: Sprkl Setup
        uses: sprkl-dev/sprkl-action/setup@master
        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.

GitHub - sprkl-dev/sprkl-actionGitHub
Logo
GitHub Marketplace
Get your token from Sprkl