This is the default workflow that is run when a
PR is opened
for an npm package
. It is meant to test the quality and safety
of the code being committed.
This action takes the following inputs:
Name | Type | Default | Required | Description |
---|---|---|---|---|
fallback_runner |
String | False | False | If true will leverage ubuntu-latest, otherwise will fall back to the J1 in-house runner |
use_validate |
Boolean | True | False | Run validation, in most case we want this |
use_chromatic |
Boolean | False | False | Run VRT Storybook tests with chromatic |
This action takes the following secrets:
Name | Required | Description |
---|---|---|
NPM_TOKEN |
True | A J1 npm.com Publish token |
CHROMATIC_PROJECT_TOKEN |
False | The Chromatic API token |
jobs:
pr:
uses: jupiterone/.github/.github/workflows/frontend_npm_pr.yml@v#
secrets:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
graph LR;
A[start flow];
B[validate];
A --> B;
jobs:
pr:
uses: jupiterone/.github/.github/workflows/frontend_npm_pr.yml@v#
with:
use_chromatic: true
secrets:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
graph LR;
A[start flow];
B[validate];
C[chromatic_upload];
A --> B;
A --> C;