Skip to content

ci: implement DeepSource test coverage tracking #362

ci: implement DeepSource test coverage tracking

ci: implement DeepSource test coverage tracking #362

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [25.x, 20.x]
steps:
- name: Install dependancies
run: sudo apt-get update && sudo apt-get install libavahi-compat-libdnssd-dev python3-guessit
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run test:coverage
- name: Report coverage to DeepSource
if: matrix.node-version == '25.x'
run: |
curl -sL https://github.com/deepsource/cli/releases/latest/download/ds -o ds
chmod +x ds
./ds report --analyzer test-coverage --key javascript --value-file ./coverage/lcov.info
env:
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}