From f4c74175b4706dd24d13e423cd1be780ca94b33b Mon Sep 17 00:00:00 2001 From: vladyslav Date: Wed, 14 May 2025 15:02:49 +0700 Subject: [PATCH 1/2] ci: update Codecov action config to include override_branch parameter --- .github/workflows/testing.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index bf80a4c..ae9c91d 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -49,8 +49,9 @@ jobs: - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 with: - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} - files: ./packages/httio/coverage/lcov.info,./packages/rest/coverage/lcov.info - flags: httio,rest slug: vladstsk/httio + flags: httio,rest + files: ./packages/httio/coverage/lcov.info,./packages/rest/coverage/lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + override_branch: main + fail_ci_if_error: true From fe4a21f0b9f1cf7c70b8bf97af8082286b0f1545 Mon Sep 17 00:00:00 2001 From: vladyslav Date: Wed, 14 May 2025 15:15:37 +0700 Subject: [PATCH 2/2] feat: add Codecov reporting workflow and update README badges --- .github/workflows/report.yml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/testing.yml | 10 ---------- README.md | 10 +++++----- packages/httio/README.md | 10 +++++----- 4 files changed, 44 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/report.yml diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml new file mode 100644 index 0000000..a7438cd --- /dev/null +++ b/.github/workflows/report.yml @@ -0,0 +1,34 @@ +name: Testing + +on: + push: + branches: + - main + +jobs: + codecov: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js ${{ matrix.node_version }} + uses: actions/setup-node@v4 + with: + cache: 'npm' + node-version: 22 + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm test + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v5 + with: + slug: vladstsk/httio + flags: httio,rest + files: ./packages/httio/coverage/lcov.info,./packages/rest/coverage/lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index ae9c91d..413d263 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -45,13 +45,3 @@ jobs: - name: Run tests run: npm test - - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v5 - with: - slug: vladstsk/httio - flags: httio,rest - files: ./packages/httio/coverage/lcov.info,./packages/rest/coverage/lcov.info - token: ${{ secrets.CODECOV_TOKEN }} - override_branch: main - fail_ci_if_error: true diff --git a/README.md b/README.md index 77241c7..9bf39c2 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # **Httio** -[![Bundle coverage](https://codecov.io/gh/vladstsk/httio/branch/main/graph/badge.svg?flag=httio)](https://codecov.io/gh/vladstsk/httio?flag=httio) -[![Bundle size](https://img.shields.io/bundlephobia/minzip/httio)](https://bundlephobia.com/package/httio) -[![Bundle tree-shaking](https://badgen.net/bundlephobia/tree-shaking/httio)](https://bundlephobia.com/package/httio) -[![Typed with TypeScript](https://badgen.net/npm/types/httio)](https://github.com/vladstsk/httio) -[![License](https://img.shields.io/npm/l/httio)](https://github.com/vladstsk/httio/blob/main/LICENSE) +[![codecov](https://codecov.io/gh/vladstsk/httio/graph/badge.svg?token=15VVLNIEN3)](https://codecov.io/gh/vladstsk/httio) +[![size](https://img.shields.io/bundlephobia/minzip/httio)](https://bundlephobia.com/package/httio) +[![tree-shaking](https://badgen.net/bundlephobia/tree-shaking/httio)](https://bundlephobia.com/package/httio) +[![types](https://badgen.net/npm/types/httio)](https://github.com/vladstsk/httio) +[![license](https://img.shields.io/npm/l/httio)](https://github.com/vladstsk/httio/blob/main/LICENSE) > Lightweight, type-safe HTTP client for browsers and Node.js. > Built on top of the native `fetch` but provides a better DX with strong typing, middleware and a minimalistic API. diff --git a/packages/httio/README.md b/packages/httio/README.md index f2e3850..748cdb1 100644 --- a/packages/httio/README.md +++ b/packages/httio/README.md @@ -1,10 +1,10 @@ # **Httio** -[![Bundle coverage](https://codecov.io/gh/vladstsk/httio/branch/main/graph/badge.svg?flag=httio)](https://codecov.io/gh/vladstsk/httio?flag=httio) -[![Bundle size](https://img.shields.io/bundlephobia/minzip/httio)](https://bundlephobia.com/package/httio) -[![Bundle tree-shaking](https://badgen.net/bundlephobia/tree-shaking/httio)](https://bundlephobia.com/package/httio) -[![Typed with TypeScript](https://badgen.net/npm/types/httio)](https://github.com/vladstsk/httio) -[![License](https://img.shields.io/npm/l/httio)](https://github.com/vladstsk/httio/blob/main/LICENSE) +[![codecov](https://codecov.io/gh/vladstsk/httio/graph/badge.svg?token=15VVLNIEN3&flag=httio)](https://codecov.io/gh/vladstsk/httio?flag=httio) +[![size](https://img.shields.io/bundlephobia/minzip/httio)](https://bundlephobia.com/package/httio) +[![tree-shaking](https://badgen.net/bundlephobia/tree-shaking/httio)](https://bundlephobia.com/package/httio) +[![types](https://badgen.net/npm/types/httio)](https://github.com/vladstsk/httio) +[![license](https://img.shields.io/npm/l/httio)](https://github.com/vladstsk/httio/blob/main/LICENSE) > Lightweight, type-safe HTTP client for browsers and Node.js. > Built on top of the native `fetch` but provides a better DX with strong typing, middleware and a minimalistic API.