Skip to content

Improve error handling and refactor URL validation #14

Improve error handling and refactor URL validation

Improve error handling and refactor URL validation #14

Workflow file for this run

name: Codecov Coverage
on:
push:
branches: [ "master" ]
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
jobs:
coverage:
name: ${{ matrix.os }} / Node.js ${{ matrix.node-version }}
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ Ubuntu, Windows, macOS ]
node-version: [ 20.x ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js / ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Clean install the project
run: npm ci
- name: Run coverage
# Currently only run coverage for unit tests
run: npx nyc npm run test:unit
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
name: codecov-unittest@${{ matrix.os }}
fail_ci_if_error: true
env_vars: os,node-version
directory: './coverage'
flags: unittests,${{ matrix.os }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true