From 727cd519b478b09c7cfdcd719b875d78812a421b Mon Sep 17 00:00:00 2001 From: Joe Pegler Date: Fri, 23 Aug 2024 14:10:59 +0100 Subject: [PATCH] chore: add ci --- .github/workflows/coverage.yml | 3 ++- .github/workflows/playground.yml | 4 +++- .github/workflows/unit-tests.yml | 3 ++- package.json | 7 ++----- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index e70533ca..9fb7e08b 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -20,11 +20,12 @@ jobs: uses: ./.github/actions/install-dependencies - name: Run the tests - run: bun run test + run: vitest -c ./tests/vitest.config.ts --coverage env: E2E_PRIVATE_KEY_ONE: ${{ secrets.E2E_PRIVATE_KEY_ONE }} BUNDLER_URL: https://api.pimlico.io/v2/84532/rpc?apikey=pim_im13GpaqtMDSiJFhXMxcVn CHAIN_ID: 84532 + CI: true - name: report coverage uses: davelosert/vitest-coverage-report-action@v2 diff --git a/.github/workflows/playground.yml b/.github/workflows/playground.yml index 14e6e59f..bf853533 100644 --- a/.github/workflows/playground.yml +++ b/.github/workflows/playground.yml @@ -21,8 +21,10 @@ jobs: uses: ./.github/actions/install-dependencies - name: Run the playground - run: RUN_PLAYGROUND=true bun run test:ci -t=Playground + run: bun run test env: E2E_PRIVATE_KEY_ONE: ${{ secrets.E2E_PRIVATE_KEY_ONE }} BUNDLER_URL: https://api.pimlico.io/v2/84532/rpc?apikey=pim_im13GpaqtMDSiJFhXMxcVn CHAIN_ID: 84532 + RUN_PLAYGROUND: true + CI: true diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index a4eafb09..192e93ee 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -21,8 +21,9 @@ jobs: uses: ./.github/actions/install-dependencies - name: Run the tests - run: bun i && bun run test:ci + run: bun run test env: E2E_PRIVATE_KEY_ONE: ${{ secrets.E2E_PRIVATE_KEY_ONE }} BUNDLER_URL: https://api.pimlico.io/v2/84532/rpc?apikey=pim_im13GpaqtMDSiJFhXMxcVn CHAIN_ID: 84532 + CI: true diff --git a/package.json b/package.json index 1ce48a10..f355382b 100644 --- a/package.json +++ b/package.json @@ -58,13 +58,10 @@ "dev": "bun link && concurrently \"bun run esm:watch\" \"bun run cjs:watch\" \"bun run esm:watch:aliases\" \"bun run cjs:watch:aliases\"", "build": "bun run clean && bun run build:cjs && bun run build:esm && bun run build:types", "clean": "rimraf ./dist/_esm ./dist/_cjs ./dist/_types ./dist/tsconfig", - "test": "vitest dev -c ./tests/vitest.config.ts", - "playground:ci": "RUN_PLAYGROUND=true bun run test:ci -t=Playground", + "test": "vitest -c ./tests/vitest.config.ts", + "test:watch": "bun run test dev", "playground": "RUN_PLAYGROUND=true bun run test -t=Playground", "playground:watch": "RUN_PLAYGROUND=true bun run test -t=Playground --watch", - "test:watch": "bun run test --watch", - "test:coverage": "CI=true vitest -c ./tests/vitest.config.ts --coverage", - "test:ci": "CI=true vitest -c ./tests/vitest.config.ts", "size": "size-limit", "docs": "typedoc --tsconfig ./tsconfig/tsconfig.esm.json", "docs:deploy": "bun run docs && gh-pages -d docs",