Skip to content

update package lock #144

update package lock

update package lock #144

Workflow file for this run

name: CI
on:
push:
branches: ["develop"]
pull_request:
branches: ["develop"]
env:
minCoverage: ${{ vars.COVERAGE_VAR }}
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run test
run: npm run test:ci
- name: Collect code coverage
id: collect
run: |
echo "coverage<<EOF" >> $GITHUB_OUTPUT
cat coverage/coverage-summary.json >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Archive code coverage
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: coverage/
- name: Check %
id: check
run: |
echo "Min coverage is $minCoverage%"
echo "Current coverage is ${{ fromJSON(steps.collect.outputs.coverage).total.lines.pct }}%"
echo "pct=${{ fromJSON(steps.collect.outputs.coverage).total.lines.pct }}" >> $GITHUB_OUTPUT
- name: Exit 1
if: ${{ steps.check.outputs.pct < env.minCoverage }}
run: |
exit 1