Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packaging: tsconfig, package.json, use pnpm, use vitest #58

Merged
merged 6 commits into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: "Run Tests"

on: [push, pull_request, workflow_dispatch]
on:
push:
branches: ["main"]
pull_request:
workflow_dispatch:

jobs:
check:
Expand All @@ -11,14 +15,19 @@ jobs:
provider: ["ethers", "viem"]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
cache: pnpm
- uses: actions/cache@v3
with:
key: api-result-cache
path: ./.cache
- run: npm ci
- run: pnpm install
- name: Run tests with ${{ matrix.provider }}
run: npm test
run: pnpm test
env:
PROVIDER: ${{ matrix.provider }}
ONLINE: 1
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ watch:
tsc --project tsconfig.esm.json -w

test:
jest
vitest run

clean:
rm -rf ./lib ./lib.*

publish: clean
npm i
npm run build:esm
npm run build:cjs
npm run build:types
npm pack
pnpm i
pnpm run build:esm
pnpm run build:cjs
pnpm run build:types
pnpm pack
size-limit

run-examples:
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.nodejs-18_x
pkgs.nodePackages.pnpm

pkgs.graphviz # For debugging
pkgs.gnumake
pkgs.bun
];

shellHook = ''
Expand Down
12 changes: 0 additions & 12 deletions jest.config.ts

This file was deleted.

Loading