Skip to content

Add: CI CodeCov

Add: CI CodeCov #32

Workflow file for this run

---
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Node.js CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
environment: build
strategy:
matrix:
# Windows is currently borked
# https://github.com/nodejs/node/issues/52682
# Disabling for now
# windows-latest
os: [ubuntu-latest]
node_version: [20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
# OS List
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
runs-on: ${{ matrix.os }}
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v4
# https://github.com/marketplace/actions/setup-node-js-environment
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
#cache: 'npm'
- run: npm ci
# - run: npm run build --if-present
- run: npm test
- run: npm run lint
- run: npm run prettier
# Upload to CodeCov
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}