test(utils): Add comprehensive unit tests for format-utils
module (…
#117
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Codecov Coverage | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
types: [opened, reopened, synchronize, ready_for_review] | |
jobs: | |
coverage: | |
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.user.login != 'dependabot[bot]') || github.actor != 'dependabot[bot]' }} | |
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: Setup FFmpeg | |
uses: FedericoCarboni/setup-ffmpeg@v3 | |
id: setup-ffmpeg | |
with: | |
ffmpeg-version: release | |
linking-type: static | |
architecture: x64 | |
github-token: ${{ github.server_url == 'https://github.com' && github.token || '' }} | |
- name: Clean install the project | |
run: npm ci | |
- name: Run coverage | |
run: npm run coverage:no-dltest | |
- name: Upload coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
name: codecov-alltests@${{ matrix.os }} | |
fail_ci_if_error: true | |
env_vars: os,node-version | |
directory: './coverage' | |
flags: all,${{ matrix.os }} | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true |