Skip to main content

Github Commit/PR check

note

This feature is available both in local app and at app.crusher.dev

We require you to link your github repo to your Crusher project,

  • Go to Project settings -> Integration
  • Click connect in github integration

  • Select your github repo

Setup github actions

Using vercel deployments?
Checkout: Integration with Vercel/Netlify
name: Running tests for Next.js
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Install node modules
run: npm i

- name: Build app
run: npm run build

- name: Run tests
run: npx crusher.dev test:run --pre-run="npm run start" --token="<crusher_token>"
  1. Copy the above code and paste it in your github actions file. You can find the file in your repo at .github/workflows/crusher.yml
  2. Replace <crusher_token> with your crusher token. You can get it by running npx crusher.dev token from your terminal

Checks on commit & PR

Create a pull request and to see Crusher in action

Was this doc helpful?
yes
could be better
by