From 0160e84070ead6ea95aa741fbb0bcc731622531b Mon Sep 17 00:00:00 2001 From: Thomas Parisot Date: Tue, 8 Oct 2024 12:36:20 +0200 Subject: [PATCH] feat: configuration de la collecte du coverage --- .github/workflows/node.yml | 18 ++++++++++++++++++ .gitignore | 2 ++ front/.gitignore | 1 - front/vite.config.js | 6 +++++- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 4cd5877a3..aa6008866 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -35,6 +35,24 @@ jobs: working-directory: ${{ matrix.app }} run: npm clean-install-test --no-audit --no-fund + - name: Coveralls + uses: coverallsapp/github-action@v2 + with: + base-path: ${{ matrix.app }} + parallel: true + flag-name: run-${{ join(matrix.*, ' - ') }} + - name: Build (if necessary) working-directory: ${{ matrix.app }} run: npm run build --if-present + + finish: + needs: build + if: ${{ always() }} + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@v2 + with: + parallel-finished: true + carryforward: "run-front,run-graphql,run-export" diff --git a/.gitignore b/.gitignore index cc769c6d1..7cb56df9f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ sails/.tmp nodemon.dev.json /.idea/ /.run/ + +coverage/ diff --git a/front/.gitignore b/front/.gitignore index b60b7884e..98d6176d7 100644 --- a/front/.gitignore +++ b/front/.gitignore @@ -13,6 +13,5 @@ node_modules/ # Mac files .DS_Store -/coverage/ /build/ public/config.json diff --git a/front/vite.config.js b/front/vite.config.js index db5b3f541..04ce7259b 100644 --- a/front/vite.config.js +++ b/front/vite.config.js @@ -64,7 +64,11 @@ export default defineConfig(async ({ mode }) => { }, test: { - root: 'src', + exclude: [ + 'build/**', + 'public/**', + 'node_modules/**' + ], coverage: { reporter: ['text', 'html', 'lcovonly'], reportsDirectory: '../coverage'