From 217ed18dcd3900885f821b98cbbae0c8d9c118e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Beltr=C3=A1n?= Date: Thu, 5 Jun 2025 08:04:09 +0200 Subject: [PATCH 1/4] ci: add workflow for coverage on main --- .github/ISSUE_TEMPLATE/main-coverage.yml | 33 ++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/main-coverage.yml diff --git a/.github/ISSUE_TEMPLATE/main-coverage.yml b/.github/ISSUE_TEMPLATE/main-coverage.yml new file mode 100644 index 00000000..deab51c6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/main-coverage.yml @@ -0,0 +1,33 @@ +name: Code Coverage (main) +on: + push: + branches: + - 'main' +jobs: + coverage: + name: Code Coverage + runs-on: ubuntu-latest + timeout-minutes: 3 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + cache: 'pnpm' + node-version-file: '.nvmrc' + + - name: Install dependencies + run: pnpm install + + - name: Run tests with coverage + run: pnpm run test:ci + + - name: Upload coverage report + uses: codecov/codecov-action@v5 + with: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 54aa625d699596467985e05d022611b34d75abf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Beltr=C3=A1n?= Date: Thu, 5 Jun 2025 08:21:28 +0200 Subject: [PATCH 2/4] refactor: move to the right folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Mario Beltrán --- .github/ISSUE_TEMPLATE/main-coverage.yml | 34 +----------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/main-coverage.yml b/.github/ISSUE_TEMPLATE/main-coverage.yml index deab51c6..02f44c59 100644 --- a/.github/ISSUE_TEMPLATE/main-coverage.yml +++ b/.github/ISSUE_TEMPLATE/main-coverage.yml @@ -1,33 +1 @@ -name: Code Coverage (main) -on: - push: - branches: - - 'main' -jobs: - coverage: - name: Code Coverage - runs-on: ubuntu-latest - timeout-minutes: 3 - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v4 - - - name: Set up Node - uses: actions/setup-node@v4 - with: - cache: 'pnpm' - node-version-file: '.nvmrc' - - - name: Install dependencies - run: pnpm install - - - name: Run tests with coverage - run: pnpm run test:ci - - - name: Upload coverage report - uses: codecov/codecov-action@v5 - with: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} +# No changes to the content of the file. The file will be moved to `.github/workflows`. From 6251cdf1d808decdc51232ca252b2d9efde8b3b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Beltr=C3=A1n?= Date: Thu, 5 Jun 2025 08:22:22 +0200 Subject: [PATCH 3/4] refactor: move to the right folder --- .github/ISSUE_TEMPLATE/main-coverage.yml | 1 - .github/workflows/main-coverage.yml | 33 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) delete mode 100644 .github/ISSUE_TEMPLATE/main-coverage.yml create mode 100644 .github/workflows/main-coverage.yml diff --git a/.github/ISSUE_TEMPLATE/main-coverage.yml b/.github/ISSUE_TEMPLATE/main-coverage.yml deleted file mode 100644 index 02f44c59..00000000 --- a/.github/ISSUE_TEMPLATE/main-coverage.yml +++ /dev/null @@ -1 +0,0 @@ -# No changes to the content of the file. The file will be moved to `.github/workflows`. diff --git a/.github/workflows/main-coverage.yml b/.github/workflows/main-coverage.yml new file mode 100644 index 00000000..deab51c6 --- /dev/null +++ b/.github/workflows/main-coverage.yml @@ -0,0 +1,33 @@ +name: Code Coverage (main) +on: + push: + branches: + - 'main' +jobs: + coverage: + name: Code Coverage + runs-on: ubuntu-latest + timeout-minutes: 3 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + cache: 'pnpm' + node-version-file: '.nvmrc' + + - name: Install dependencies + run: pnpm install + + - name: Run tests with coverage + run: pnpm run test:ci + + - name: Upload coverage report + uses: codecov/codecov-action@v5 + with: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 9e279e80f77ca3f147db6bf6e833aaa1a8b6af78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Beltr=C3=A1n?= Date: Thu, 5 Jun 2025 08:28:44 +0200 Subject: [PATCH 4/4] ci: add explicit permissions --- .github/workflows/main-coverage.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/main-coverage.yml b/.github/workflows/main-coverage.yml index deab51c6..53b30871 100644 --- a/.github/workflows/main-coverage.yml +++ b/.github/workflows/main-coverage.yml @@ -3,6 +3,11 @@ on: push: branches: - 'main' + +permissions: + contents: read + statuses: write + jobs: coverage: name: Code Coverage