diff --git a/.github/workflows/testing.yaml b/.github/workflows/coverage.yaml similarity index 100% rename from .github/workflows/testing.yaml rename to .github/workflows/coverage.yaml diff --git a/README.md b/README.md index f418679..35bd6ed 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Steem Proxy Cloudflare Snippet -[![Steem Proxy CI](https://github.com/DoctorLai/steem-proxy-cloudflare/actions/workflows/ci.yaml/badge.svg)](https://github.com/DoctorLai/steem-proxy-cloudflare/actions/workflows/ci.yaml) [![Steem Proxy Lint & Format](https://github.com/DoctorLai/steem-proxy-cloudflare/actions/workflows/lint.yml/badge.svg)](https://github.com/DoctorLai/steem-proxy-cloudflare/actions/workflows/lint.yml) [![Run Tests with Coverage](https://github.com/DoctorLai/steem-proxy-cloudflare/actions/workflows/testing.yaml/badge.svg)](https://github.com/DoctorLai/steem-proxy-cloudflare/actions/workflows/testing.yaml) +[![Steem Proxy CI](https://github.com/DoctorLai/steem-proxy-cloudflare/actions/workflows/ci.yaml/badge.svg)](https://github.com/DoctorLai/steem-proxy-cloudflare/actions/workflows/ci.yaml) [![Steem Proxy Lint & Format](https://github.com/DoctorLai/steem-proxy-cloudflare/actions/workflows/lint.yml/badge.svg)](https://github.com/DoctorLai/steem-proxy-cloudflare/actions/workflows/lint.yml) [![Run Tests with Coverage](https://github.com/DoctorLai/steem-proxy-cloudflare/actions/workflows/coverage.yaml/badge.svg)](https://github.com/DoctorLai/steem-proxy-cloudflare/actions/workflows/coverage.yaml) A lightweight Cloudflare Snippet that automatically selects the healthiest Steem RPC node, ensuring stable, low-latency JSON-RPC access. @@ -35,6 +35,11 @@ Add a DNS record that points to ip `192.0.2.1` indicating no server will be rout npm test ``` +## Test Coverage +```bash +npx vitest run --coverage +``` + ## Deploy ```bash npm run deploy diff --git a/vitest.config.js b/vitest.config.js index e01f88a..cd9389f 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -7,8 +7,10 @@ export default defineConfig({ reporter: ['text', 'html', 'json', 'json-summary'], reportsDirectory: './coverage', thresholds: { - lines: 80, - statements: 80, + lines: 96, + statements: 96, + functions: 100, + branches: 88, }, }, },