-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
34 lines (32 loc) · 1.35 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: "Jest coverage diff reporter"
branding:
icon: "umbrella"
color: "blue"
description: "Comments jest coverage report on your PR and compares it with its base branch coverage."
author: "vgrafe"
inputs:
github-token:
description: "A github access token"
default: ${{ github.token }}
scope:
description: "Set the scope of the jest run: all, changed in PR, changed since last successful run on the PR"
default: "all"
options:
- all
- pr-changes
- changes-since-last-success
run-steps:
description: "skip any step by removing the corresponging item from this comma-separated list"
default: "compare-with-base-branch,report-on-github,annotations-changes,annotations-all"
runs:
using: composite
steps:
# forcing node 16.10.0 since later versions have memory issues with jest
- uses: actions/setup-node@v3
with:
node-version: "16.10.0"
# needed for cache to work https://github.com/crazy-max/ghaction-github-runtime
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v2
- run: DEFAULT_BRANCH=${{ github.event.repository.default_branch }} BASE_SHA=${{ github.event.pull_request.head.sha }} INPUT_RUN_STEPS=${{ inputs.run-steps }} INPUT_GITHUB_TOKEN=${{ inputs.github-token }} INPUT_SCOPE=${{ inputs.scope }} node ${{ github.action_path }}/dist/index.js
shell: bash