From 1e601bfa53e41c267bae80c7cbcea23341a69374 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Fri, 29 Mar 2024 23:37:48 +0000 Subject: [PATCH] chore: configuring codeclimate --- .github/workflows/coverage.yml | 2 +- .gitignore | 5 ++++- README.md | 2 ++ package.json | 1 + test/reports/.keep | 0 5 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 test/reports/.keep diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ab6465d..7127ffb 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -38,6 +38,6 @@ jobs: - name: Report Coverage uses: paambaati/codeclimate-action@v5.0.0 env: - CC_TEST_REPORTER_ID: 760097cb88b4c685dce427cf94a8e12a5f082774d06b4f4f5daef839ffc07821 + CC_TEST_REPORTER_ID: 03d3b753352184e77df4c96aaef330a330eca28118a2a6da010b305f12216f45 with: coverageCommand: pnpm run lcov diff --git a/.gitignore b/.gitignore index 8775503..79bc381 100644 --- a/.gitignore +++ b/.gitignore @@ -129,4 +129,7 @@ dist .yarn/install-state.gz .pnp.* -public \ No newline at end of file +public + +test/reports/* +!test/reports/.keep \ No newline at end of file diff --git a/README.md b/README.md index b927c76..5cc53d3 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![NPM downloads](https://img.shields.io/npm/dm/@bbc/cloudflare-queue-consumer.svg?style=flat)](https://npmjs.org/package/@bbc/cloudflare-queue-consumer) [![Build Status](https://github.com/bbc/cloudflare-queue-consumer/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/bbc/cloudflare-queue-consumer/actions/workflows/test.yml) +[![Maintainability](https://api.codeclimate.com/v1/badges/a0fcd77021e4f54ffdd4/maintainability)](https://codeclimate.com/github/bbc/cloudflare-queue-consumer/maintainability) +[![Test Coverage](https://api.codeclimate.com/v1/badges/a0fcd77021e4f54ffdd4/test_coverage)](https://codeclimate.com/github/bbc/cloudflare-queue-consumer/test_coverage) Build CloudFlare Queues applications without the boilerplate. Just define an async function that handles the message processing. diff --git a/package.json b/package.json index bc28e46..6c846a7 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "format:check": "prettier --check \"**/*.{js,json,jsx,md,ts,tsx,html}\"", "test:unit": "node --import tsx --test ./test/unit/*.test.ts", "test": "pnpm run test:unit && pnpm run lint && pnpm run format:check", + "lcov": "node --import tsx --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=test/reports/lcov.info ./test/unit/*.test.ts", "generate-docs": "typedoc", "dev": "DEBUG=cloudflare-queue-consumer tsx ./example/index.ts" }, diff --git a/test/reports/.keep b/test/reports/.keep new file mode 100644 index 0000000..e69de29