Skip to content
Open
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
44 changes: 38 additions & 6 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main
with:
cache-key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
install-command: 'pnpm install --frozen-lockfile'

- name: Run audit
run: yarn audit:ci
run: pnpm audit:ci

check-formatting:
name: 'Check Formatting'
Expand All @@ -30,11 +38,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main
with:
cache-key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
install-command: 'pnpm install --frozen-lockfile'

- name: Check formatting with Prettier
run: yarn prettier:check
run: pnpm prettier:check

test-unit:
name: Test (Unit)
Expand All @@ -43,17 +59,25 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main
with:
cache-key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
install-command: 'pnpm install --frozen-lockfile'

- name: Copy .env
run: cp ./.env.example ./.env

- name: Build
run: yarn build
run: pnpm build

- name: Test
run: yarn test:unit
run: pnpm test:unit

test-integration:
name: Test (Integration) - ${{ matrix.config.name }}
Expand All @@ -75,8 +99,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main
with:
cache-key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
install-command: 'pnpm install --frozen-lockfile'

- name: Set up the local node
uses: OffchainLabs/actions/run-nitro-test-node@feat-simplify
Expand All @@ -89,10 +121,10 @@ jobs:
run: cp ./.env.example ./.env

- name: Build
run: yarn build
run: pnpm build

- name: Test
run: |
INTEGRATION_TEST_DECIMALS=${{matrix.config.decimals}} \
INTEGRATION_TEST_NITRO_CONTRACTS_BRANCH=${{matrix.config.nitro-contracts-branch}} \
yarn test:integration
pnpm test:integration
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Clone the branch `main` of [nitro-testnode](https://github.com/OffchainLabs/nitr
Then, run the integration tests:

```bash
yarn test:integration
pnpm test:integration
```

## Examples
Expand Down
17 changes: 4 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
{
"workspaces": [
"src",
"examples/*"
],
"private": true,
"type": "module",
"scripts": {
"prebuild": "rm -rf ./src/dist",
"build": "tsc --project ./tsconfig.json --module commonjs --outDir ./src/dist --declaration",
"dev": "yarn build --watch",
"dev": "pnpm build --watch",
"generate": "wagmi generate",
"generate:node-config-type": "yarn build && node ./src/dist/scripts/generateNodeConfigType.js",
"generate:node-config-type": "pnpm build && node ./src/dist/scripts/generateNodeConfigType.js",
"postgenerate:node-config-type": "prettier --write ./src/types/NodeConfig.generated.ts",
"test:unit": "vitest --config vitest.unit.config.ts",
"test:integration": "vitest --config vitest.integration.config.ts",
Expand All @@ -31,12 +27,7 @@
"typescript": "^5.2.2",
"vitest": "^3.0.9"
},
"resolutions": {
"**/@wagmi/cli/viem/ws": "8.17.1",
"**/@ethersproject/providers/ws": "7.5.10",
"**/elliptic": "6.6.1",
"**/nanoid": "3.3.8",
"**/base-x": "3.0.11",
"**/pbkdf2": "3.1.3"
"dependencies": {
"viem": "1.20.0"
}
}
Loading
Loading