From 59fe68c2afc64f429748faa5525279cc62d6d5cf Mon Sep 17 00:00:00 2001 From: Hugo Caillard <911307+hugocaillard@users.noreply.github.com> Date: Thu, 17 Oct 2024 11:08:46 +0200 Subject: [PATCH] ci: publish coverage to codecov --- .github/workflows/test-contrat.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-contrat.yml b/.github/workflows/test-contrat.yml index a2a4b79..bbfd7dc 100644 --- a/.github/workflows/test-contrat.yml +++ b/.github/workflows/test-contrat.yml @@ -10,7 +10,7 @@ on: branches: [ "main" ] jobs: - build: + test: runs-on: ubuntu-latest @@ -20,11 +20,18 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v4 - - 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 test + - uses: actions/checkout@v4 + - 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 test:reports + + - name: Upload coverage data to codecov + if: ${{ matrix.node-version == '20.x' }} + uses: codecov/codecov-action@v4 + with: + files: lcov.info + token: ${{ secrets.CODECOV_TOKEN }}