From 36e2cca71fbf548edb970f09362e1a0da3582f58 Mon Sep 17 00:00:00 2001 From: Yogesh Kumar Date: Fri, 20 Feb 2026 03:22:03 +0530 Subject: [PATCH 1/3] Add GitHub Actions CI workflow Lint, test with coverage, and build on push/PR to master. Upload coverage reports to Codecov. --- .github/workflows/ci.yml | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3e4c18c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: yarn + - run: yarn install --frozen-lockfile + - run: yarn lint + + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: yarn + - run: yarn install --frozen-lockfile + - run: yarn test --coverage + - uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage/lcov.info + fail_ci_if_error: true + + build: + name: Build + runs-on: ubuntu-latest + needs: [lint, test] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: yarn + - run: yarn install --frozen-lockfile + - run: yarn build From 6209257db646f6d7af791b7cf50ec78c8524c154 Mon Sep 17 00:00:00 2001 From: Yogesh Kumar Date: Fri, 20 Feb 2026 03:22:07 +0530 Subject: [PATCH 2/3] Configure jest coverage collection for Codecov Add collectCoverageFrom to target lib, components, hooks, config, and context directories. Output lcov format for Codecov integration. --- jest.config.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jest.config.ts b/jest.config.ts index 3ed582d..2d53ae3 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -31,6 +31,16 @@ const config: Config = { "^@/(.*)$": "/$1", }, testPathIgnorePatterns: ["/node_modules/", "__tests__/helpers/"], + collectCoverageFrom: [ + "lib/**/*.{ts,tsx}", + "components/**/*.{ts,tsx}", + "hooks/**/*.{ts,tsx}", + "config/**/*.{ts,tsx}", + "context/**/*.{ts,tsx}", + "!**/*.d.ts", + "!**/index.ts", + ], + coverageReporters: ["lcov", "text", "text-summary"], }; // Use async config to modify transformIgnorePatterns after next/jest builds them From ea204d6637fd1452481c55ab2baa29e9b248af14 Mon Sep 17 00:00:00 2001 From: Yogesh Kumar Date: Fri, 20 Feb 2026 03:22:09 +0530 Subject: [PATCH 3/3] Add CI, coverage, and W3F grant badges to README --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index e310050..8a91ac9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # Relaycode: Rethinking Extrinsics in Polkadot +[![CI](https://github.com/itsyogesh/relaycode/actions/workflows/ci.yml/badge.svg)](https://github.com/itsyogesh/relaycode/actions/workflows/ci.yml) +[![codecov](https://codecov.io/gh/itsyogesh/relaycode/branch/master/graph/badge.svg)](https://codecov.io/gh/itsyogesh/relaycode) +[![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue.svg)](https://www.typescriptlang.org/) +[![W3F Grant](https://img.shields.io/badge/Web3_Foundation-Grant-green.svg)](https://grants.web3.foundation/) ## Project Overview Relaycode is an intuitive extrinsics builder designed to transform the way developers and users interact with extrinsics in the Polkadot ecosystem. By bridging the gap between complex pallet operations and user-friendly interfaces, Relaycode gives both regular users and developers the ability to harness the full potential of extrinsics the Polkadot ecosystem.