Skip to content

Commit

Permalink
chore: add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
joepegler committed Aug 23, 2024
1 parent 3a39ca1 commit f4895d4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 5 additions & 2 deletions tests/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { join } from "node:path"
import { defineConfig } from "vitest/config"

// @ts-ignore
console.log(___dirname)

export default defineConfig({
test: {
coverage: {
Expand All @@ -25,8 +28,8 @@ export default defineConfig({
statements: 80
}
},
include: ["tests/**/*.test.ts"],
globalSetup: [join(__dirname, "./globalSetup.ts")],
include: ["./tests/**/*.test.ts"],
globalSetup: ["./globalSetup.ts"],
sequence: {
concurrent: false
},
Expand Down

0 comments on commit f4895d4

Please sign in to comment.