Skip to content

Commit

Permalink
Monorepo: Update lru-cache dependencies (ESM) / Switch Browser Test P…
Browse files Browse the repository at this point in the history
…rovider (ethereumjs#2804)

* StateManager: update lru-cache from v9 to v10 (seamless)

* Trie: update lru-cache from v7 to v9, added undefined/null @ts-ignore and comment

* Rebuild package-lock.json

* Trie: replace @ts-ignore by any

* Util: fix browser tests (JSON import update)

* Monorepo: add browser CI workflow run (temporary or permanent, TBD)

* Add possibility to skip browser test files, excluding transactionRunner.spec.ts and eip4844.spec.ts for tx

* Monorepo: update vitest from 0.32.0 -> 0.32.2, switched to playwright browser test provider, removed webdriverio

* Rebuild package-lock.json

* Update packages to playwright test provider, updated browser workflow file

* Add install step for playwright dependencies in ci

* set isolate flag

* Exclude account/address as these are failing

* Add browser comment

* Remove lint command

* Remove util from browser tests for now

* disable util, enable common

---------

Co-authored-by: acolytec3 <[email protected]>
  • Loading branch information
holgerd77 and acolytec3 authored Jun 21, 2023
1 parent 005595c commit a37f51f
Show file tree
Hide file tree
Showing 20 changed files with 2,317 additions and 278 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/browser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Browser
on:
push:
branches: [master, develop]
tags: ['*']
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:

env:
cwd: ${{github.workspace}}

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test-all-browser:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16]
steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- run: npm ci

# Install playwright dependencies
- run: npx playwright install-deps

- run: npm run test:browser -w=@ethereumjs/rlp
# - run: npm run test:browser -w=@ethereumjs/util
# Util: random tests fail with an odd "unable to import a module" error
- run: npm run test:browser -w=@etheruemjs/common
# Trie: several tests not passing yet
# - run: npm run test:browser -w=@ethereumjs/trie
- run: npm run test:browser -w=@ethereumjs/tx
# Block: serveral tests not passing yet
# - run: npm run test:browser -w=@ethereumjs/block
# No browser tests for devp2p
# Blockchain: strange errors, needs another look
# - run: npm run test:browser -w=@ethereumjs/blockchain
# No browser tests for ethash
# EVM: several tests not passing yet
# - run: cd ../evm && npm run test:browser
# StateManager: selected tests not passing yet
# - run: cd ../statemanager && npm run test:browser
# Wallet: import failing
# - run: npm run test:browser -w=@ethereumjs/wallet
# VM: several tests not passing yet
# - run: npm run test:browser -w=@ethereumjs/vm

2 changes: 2 additions & 0 deletions config/eslint.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ module.exports = {
'scripts',
'typedoc.js',
'webpack.config.js',
'vitest.config.ts',
'vitest.config.browser.ts',
],
extends: [
'typestrict',
Expand Down
Loading

0 comments on commit a37f51f

Please sign in to comment.