From 96c4b0411d4b34fe360e5a26b5c42463ff41ecce Mon Sep 17 00:00:00 2001 From: Guillaume Vix Date: Fri, 28 Feb 2025 14:35:24 +0100 Subject: [PATCH 1/3] ci: add codecov workflow --- .github/workflows/codecov.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..5eb3262 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,30 @@ +name: Run tests and upload coverage + +on: + push + +jobs: + test: + name: Run tests and collect coverage + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20.x + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npx vitest run --coverage + + - name: Upload results to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} From 4069f60d281c6608deca1160133a0316214a6d2e Mon Sep 17 00:00:00 2001 From: Guillaume Vix <54674811+GuillaumeVix@users.noreply.github.com> Date: Mon, 3 Mar 2025 08:55:10 +0100 Subject: [PATCH 2/3] Change from vitest to jest --- .github/workflows/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 5eb3262..8c22f58 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -22,7 +22,7 @@ jobs: run: npm ci - name: Run tests - run: npx vitest run --coverage + run: npx jest --coverage - name: Upload results to Codecov uses: codecov/codecov-action@v5 From 2edaea1e4ad8f9e9d80ec6a55dd35048d8d80670 Mon Sep 17 00:00:00 2001 From: Guillaume Vix <54674811+GuillaumeVix@users.noreply.github.com> Date: Thu, 6 Mar 2025 11:29:56 +0100 Subject: [PATCH 3/3] Update codecov.yml to use vitest instead of jest --- .github/workflows/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 8c22f58..5eb3262 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -22,7 +22,7 @@ jobs: run: npm ci - name: Run tests - run: npx jest --coverage + run: npx vitest run --coverage - name: Upload results to Codecov uses: codecov/codecov-action@v5