Skip to content

fix: Change env variable REFINER_NPS_PROJECT_ID -> REFINER_NPS_FORM_PROJECT #12120

fix: Change env variable REFINER_NPS_PROJECT_ID -> REFINER_NPS_FORM_PROJECT

fix: Change env variable REFINER_NPS_PROJECT_ID -> REFINER_NPS_FORM_PROJECT #12120

Workflow file for this run

name: Unit Tests
on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, edited]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 16
- name: Install dependencies
run: npm install --save-dev --legacy-peer-deps
- name: Run Tests
run: npm run test
- name: Unit Test Coverage
uses: fylein/comment-test-coverage@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: coverage/coverage-summary.json
title: Unit Test Coverage
- name: Check Coverage Percentage
run: |
lines=$(jq '.total.lines.pct' < coverage/coverage-summary.json)
statements=$(jq '.total.statements.pct' < coverage/coverage-summary.json)
branches=$(jq '.total.branches.pct' < coverage/coverage-summary.json)
functions=$(jq '.total.functions.pct' < coverage/coverage-summary.json)
if (( $(echo "$lines < 95.0" | bc -l) || \
$(echo "$statements < 95.0" | bc -l) || \
$(echo "$branches < 91.10" | bc -l) || \
$(echo "$functions < 94.0" | bc -l) )); then
echo "Code Coverage Percentage is below 95%"
exit 1
fi