Skip to content

chore: init coverage ci with codecov #4

chore: init coverage ci with codecov

chore: init coverage ci with codecov #4

Workflow file for this run

# This is a basic workflow to automate run-tests & update code coverage percent with Actions
name: Update Coverage Badge
# Controls when the action will run. Triggers the workflow on push
# events but only for the master branch
on:
push:
branches: [master]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
node: [16, 18]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Run tests
run: npm t
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1