From f6165c55ad04716b739db72c63b64b168a74be0a Mon Sep 17 00:00:00 2001 From: dtfiedler Date: Tue, 23 Apr 2024 10:37:22 -0600 Subject: [PATCH] chore(codecov): add codecoverage reports --- .github/workflows/build.yml | 27 ++++++++++++++++++++++++++- README.md | 2 ++ codecov.yml | 6 ++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 codecov.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e7501946..3d917ef2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: node_version: [18.x, 20.x] - command: ['lint', 'format', 'test:integration', 'build'] + command: ['lint', 'format', 'build'] steps: - uses: actions/checkout@v4 @@ -24,3 +24,28 @@ jobs: run: yarn --immutable --immutable-cache - run: yarn ${{ matrix.command }} + + test: + runs-on: ubuntu-latest + strategy: + matrix: + node_version: [18.x, 20.x] + steps: + - uses: actions/checkout@v4 + + - name: Set Up node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node_version }} + cache: 'yarn' + + - name: Install dependencies + run: yarn --immutable --immutable-cache + + - name: Run tests + run: yarn test + + - name: Upload coverage + uses: codecov/codecov-action@v4.0.1 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/README.md b/README.md index 02961a54..21f8ab42 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # @ar-io/sdk +[![codecov](https://codecov.io/gh/ar-io/ar-io-sdk/graph/badge.svg?token=7dXKcT7dJy)](https://codecov.io/gh/ar-io/ar-io-sdk) + This is the home of [ar.io] SDK. This SDK provides functionality for interacting with the ar.io ecosystem of services (e.g. gateways and observers) and protocols (e.g. ArNS). It is available for both NodeJS and Web environments. ## Table of Contents diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..3380cf98 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,6 @@ +coverage: + status: + project: + default: + target: 80% + threshold: 1%