From a02a10bee15f7e7047351cd4bdda257917336e98 Mon Sep 17 00:00:00 2001 From: Akos Osvald Date: Tue, 9 Sep 2025 14:22:49 +0200 Subject: [PATCH 01/11] coverage badge reporting --- .github/workflows/node.js.yml | 8 ++++---- jest.config.js | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2284b93..cb23aab 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,7 +1,4 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Node.js CI +name: CI on: push: @@ -29,3 +26,6 @@ jobs: - run: npm ci - run: npm run build --if-present - run: npm test + - name: Update Coverage Badge + if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) + uses: we-cli/coverage-badge-action@main diff --git a/jest.config.js b/jest.config.js index 984ecf5..cad4a72 100644 --- a/jest.config.js +++ b/jest.config.js @@ -14,6 +14,7 @@ module.exports = { collectCoverageFrom: [ 'src/**/*.{ts,tsx}' ], + coverageReporters: ['json-summary', "clover", "json", "lcov", "text"], verbose: true, reporters: [['github-actions', {silent: false}], 'summary'], }; From 1f5e9aeca00856bdeff8fd5b9cd19fbe2c432952 Mon Sep 17 00:00:00 2001 From: Akos Osvald Date: Tue, 9 Sep 2025 14:28:17 +0200 Subject: [PATCH 02/11] coverage artifacts are saved --- .github/workflows/node.js.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index cb23aab..0561bc3 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -29,3 +29,7 @@ jobs: - name: Update Coverage Badge if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) uses: we-cli/coverage-badge-action@main + - uses: actions/upload-artifact@v4 + with: + name: coverage-artifacts + path: coverage # or path/to/artifact From dacd24d21ac01bb2729939c8a5047d40baec6d6b Mon Sep 17 00:00:00 2001 From: Akos Osvald Date: Tue, 9 Sep 2025 14:29:05 +0200 Subject: [PATCH 03/11] path fix --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 0561bc3..e68e217 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -31,5 +31,5 @@ jobs: uses: we-cli/coverage-badge-action@main - uses: actions/upload-artifact@v4 with: - name: coverage-artifacts - path: coverage # or path/to/artifact + name: coverage-artifacts + path: coverage # or path/to/artifact From e36b6a6d46b00dac4fc5422ce982c20c6ef86e37 Mon Sep 17 00:00:00 2001 From: Akos Osvald Date: Tue, 9 Sep 2025 14:46:42 +0200 Subject: [PATCH 04/11] save artifacts separately --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index e68e217..91b011e 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -27,9 +27,9 @@ jobs: - run: npm run build --if-present - run: npm test - name: Update Coverage Badge - if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) + if: ${{ matrix.node-version == 20.x }} uses: we-cli/coverage-badge-action@main - uses: actions/upload-artifact@v4 with: - name: coverage-artifacts + name: coverage-artifacts-${{ matrix.node-version }} path: coverage # or path/to/artifact From a13cfc042174463c69e5ff518fb34f667f5ce5f8 Mon Sep 17 00:00:00 2001 From: Akos Osvald Date: Tue, 9 Sep 2025 14:51:20 +0200 Subject: [PATCH 05/11] node version updae --- .github/workflows/node.js.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 91b011e..083a590 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [18.x, 20.x, 22.x] + node-version: [20, 22, 24] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: @@ -27,7 +27,7 @@ jobs: - run: npm run build --if-present - run: npm test - name: Update Coverage Badge - if: ${{ matrix.node-version == 20.x }} + if: ${{ matrix.node-version == 20 }} uses: we-cli/coverage-badge-action@main - uses: actions/upload-artifact@v4 with: From 991440c7cbe489370ba621c5b7b824f911f471a8 Mon Sep 17 00:00:00 2001 From: Akos Osvald Date: Tue, 9 Sep 2025 14:58:31 +0200 Subject: [PATCH 06/11] coverage badge is added to readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8d48713..947156a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![Node.js CI](https://github.com/osvalda/smart-time-input/actions/workflows/node.js.yml/badge.svg)](https://github.com/osvalda/smart-time-input/actions/workflows/node.js.yml) [![NPM Version](https://img.shields.io/npm/v/%40osvalda%2Fsmart-time-input)](https://www.npmjs.com/package/@osvalda/smart-time-input) +[![cov](https://osvalda.github.io/smart-time-input/badges/coverage.svg)](https://github.com/osvalda/smart-time-input/actions) ## Smart Time Input React Component From 9563781f8da54cb39e7802fa536ff8e397992d9d Mon Sep 17 00:00:00 2001 From: Akos Osvald Date: Tue, 9 Sep 2025 15:33:08 +0200 Subject: [PATCH 07/11] JSON based badges --- .github/workflows/node.js.yml | 8 +++++--- jest.config.js | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 083a590..044a666 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -26,9 +26,11 @@ jobs: - run: npm ci - run: npm run build --if-present - run: npm test - - name: Update Coverage Badge - if: ${{ matrix.node-version == 20 }} - uses: we-cli/coverage-badge-action@main + - name: Generate ci bade JSONs + uses: gaelgirodon/ci-badges-action@v1 + with: + gist-id: + token: ${{ secrets.GIST_TOKEN }} - uses: actions/upload-artifact@v4 with: name: coverage-artifacts-${{ matrix.node-version }} diff --git a/jest.config.js b/jest.config.js index cad4a72..7fab9d0 100644 --- a/jest.config.js +++ b/jest.config.js @@ -16,5 +16,5 @@ module.exports = { ], coverageReporters: ['json-summary', "clover", "json", "lcov", "text"], verbose: true, - reporters: [['github-actions', {silent: false}], 'summary'], + reporters: [['github-actions', {silent: false}], 'summary', 'jest-junit'], }; From 51ad72bbee4706cec5545aa4880ccb75531f8b8e Mon Sep 17 00:00:00 2001 From: Akos Osvald Date: Tue, 9 Sep 2025 15:37:10 +0200 Subject: [PATCH 08/11] junit reporter is temp removed --- .github/workflows/node.js.yml | 1 + jest.config.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 044a666..45f52c5 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -27,6 +27,7 @@ jobs: - run: npm run build --if-present - run: npm test - name: Generate ci bade JSONs + if: ${{ matrix.node-version == 20 }} uses: gaelgirodon/ci-badges-action@v1 with: gist-id: diff --git a/jest.config.js b/jest.config.js index 7fab9d0..cad4a72 100644 --- a/jest.config.js +++ b/jest.config.js @@ -16,5 +16,5 @@ module.exports = { ], coverageReporters: ['json-summary', "clover", "json", "lcov", "text"], verbose: true, - reporters: [['github-actions', {silent: false}], 'summary', 'jest-junit'], + reporters: [['github-actions', {silent: false}], 'summary'], }; From a9d947a59682e63ab78e837110c31182c17b4113 Mon Sep 17 00:00:00 2001 From: Akos Osvald Date: Tue, 9 Sep 2025 15:39:47 +0200 Subject: [PATCH 09/11] gist id is updated --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 45f52c5..eb8d70f 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -30,7 +30,7 @@ jobs: if: ${{ matrix.node-version == 20 }} uses: gaelgirodon/ci-badges-action@v1 with: - gist-id: + gist-id: 334525743d4f008bb0028808bfc44798 token: ${{ secrets.GIST_TOKEN }} - uses: actions/upload-artifact@v4 with: From aa59fb8e46bb543715f9bc4c4702a70e1ee3f78e Mon Sep 17 00:00:00 2001 From: Akos Osvald Date: Tue, 9 Sep 2025 15:48:50 +0200 Subject: [PATCH 10/11] badge is updated on readme --- .github/workflows/node.js.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index eb8d70f..6bebec1 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -26,7 +26,7 @@ jobs: - run: npm ci - run: npm run build --if-present - run: npm test - - name: Generate ci bade JSONs + - name: Generating ci badge JSONs if: ${{ matrix.node-version == 20 }} uses: gaelgirodon/ci-badges-action@v1 with: diff --git a/README.md b/README.md index 947156a..ebcbf5c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Node.js CI](https://github.com/osvalda/smart-time-input/actions/workflows/node.js.yml/badge.svg)](https://github.com/osvalda/smart-time-input/actions/workflows/node.js.yml) [![NPM Version](https://img.shields.io/npm/v/%40osvalda%2Fsmart-time-input)](https://www.npmjs.com/package/@osvalda/smart-time-input) -[![cov](https://osvalda.github.io/smart-time-input/badges/coverage.svg)](https://github.com/osvalda/smart-time-input/actions) +![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fosvalda%2F334525743d4f008bb0028808bfc44798%2Fraw%2Fsmart-time-input-lcov-coverage.json) ## Smart Time Input React Component From 9ad4a974214e9cf50e91e228d0f722fc92186c2f Mon Sep 17 00:00:00 2001 From: Akos Osvald Date: Tue, 9 Sep 2025 15:54:44 +0200 Subject: [PATCH 11/11] reference prefix added to files --- .github/workflows/node.js.yml | 1 + README.md | 5 ++- jest.config.js | 2 +- package-lock.json | 74 ++++++++++++++++++++++++++++++++++- package.json | 1 + 5 files changed, 79 insertions(+), 4 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 6bebec1..34d062e 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -32,6 +32,7 @@ jobs: with: gist-id: 334525743d4f008bb0028808bfc44798 token: ${{ secrets.GIST_TOKEN }} + ref: true - uses: actions/upload-artifact@v4 with: name: coverage-artifacts-${{ matrix.node-version }} diff --git a/README.md b/README.md index ebcbf5c..54cb090 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ -[![Node.js CI](https://github.com/osvalda/smart-time-input/actions/workflows/node.js.yml/badge.svg)](https://github.com/osvalda/smart-time-input/actions/workflows/node.js.yml) [![NPM Version](https://img.shields.io/npm/v/%40osvalda%2Fsmart-time-input)](https://www.npmjs.com/package/@osvalda/smart-time-input) +![GitHub package.json dev/peer/optional dependency version](https://img.shields.io/github/package-json/dependency-version/osvalda/smart-time-input/dev/react) +![GitHub package.json dev/peer/optional dependency version](https://img.shields.io/github/package-json/dependency-version/osvalda/smart-time-input/dev/typescript) +[![Node.js CI](https://github.com/osvalda/smart-time-input/actions/workflows/node.js.yml/badge.svg)](https://github.com/osvalda/smart-time-input/actions/workflows/node.js.yml) +![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fosvalda%2F334525743d4f008bb0028808bfc44798%2Fraw%2Fsmart-time-input-1-merge-junit-tests.json) ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fosvalda%2F334525743d4f008bb0028808bfc44798%2Fraw%2Fsmart-time-input-lcov-coverage.json) ## Smart Time Input React Component diff --git a/jest.config.js b/jest.config.js index cad4a72..7fab9d0 100644 --- a/jest.config.js +++ b/jest.config.js @@ -16,5 +16,5 @@ module.exports = { ], coverageReporters: ['json-summary', "clover", "json", "lcov", "text"], verbose: true, - reporters: [['github-actions', {silent: false}], 'summary'], + reporters: [['github-actions', {silent: false}], 'summary', 'jest-junit'], }; diff --git a/package-lock.json b/package-lock.json index 1fc74fd..222edfc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@osvalda/smart-time-input", - "version": "1.0.2", + "version": "1.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@osvalda/smart-time-input", - "version": "1.0.2", + "version": "1.0.3", "license": "MIT", "devDependencies": { "@babel/core": "^7.28.4", @@ -17,6 +17,7 @@ "@types/react": "^19.1.12", "babel-jest": "^30.1.2", "jest": "^30.1.3", + "jest-junit": "^16.0.0", "react": "^19.1.1", "ts-jest": "^29.4.1", "ts-node": "^10.9.2", @@ -4317,6 +4318,45 @@ "fsevents": "^2.3.3" } }, + "node_modules/jest-junit": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-16.0.0.tgz", + "integrity": "sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "mkdirp": "^1.0.4", + "strip-ansi": "^6.0.1", + "uuid": "^8.3.2", + "xml": "^1.0.1" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/jest-junit/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-junit/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/jest-leak-detector": { "version": "30.1.0", "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.1.0.tgz", @@ -4895,6 +4935,19 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -6060,6 +6113,16 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -6231,6 +6294,13 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/xml": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", + "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==", + "dev": true, + "license": "MIT" + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/package.json b/package.json index 6a4d9f8..b6ecc34 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "@types/react": "^19.1.12", "babel-jest": "^30.1.2", "jest": "^30.1.3", + "jest-junit": "^16.0.0", "react": "^19.1.1", "ts-jest": "^29.4.1", "ts-node": "^10.9.2",