fix: failing ci tests for `SmartProvider` and `OpStackIsm.t.sol` (#3148)

### Description

- Problem: OpStackIsm.t.sol was failing because of very stale block
number for fork
Fix: Excluding foundry fork testing  from CI and updating block number

- Problem: SmartProvider getLogs tests failing because the the results
end up being an empty list and getConfirmations results a smaller number
of confirmations than expected (712 vs 1705184)
fix: excluded from ci

### Drive-by changes

None

### Related issues

None

### Backward compatibility

Yes

### Testing

Manual
avious00-typo-patch
Kunal Arora 10 months ago committed by GitHub
parent 8d8ba3f7ab
commit 9561931571
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .github/workflows/test.yml
  2. 1
      package.json
  3. 4
      solidity/foundry.toml
  4. 1
      solidity/package.json
  5. 4
      solidity/test/isms/OPStackIsm.t.sol
  6. 1
      typescript/cli/package.json
  7. 1
      typescript/helloworld/package.json
  8. 3
      typescript/infra/package.json
  9. 1
      typescript/sdk/package.json
  10. 3
      typescript/utils/package.json

@ -126,7 +126,7 @@ jobs:
key: ${{ github.sha }}
- name: Unit Tests
run: yarn test
run: yarn test:ci
metadata-check:
runs-on: ubuntu-latest

@ -23,6 +23,7 @@
"prettier": "yarn workspaces foreach --since --parallel run prettier",
"lint": "yarn workspaces foreach --since --parallel run lint",
"test": "yarn workspaces foreach --all --parallel run test",
"test:ci": "yarn workspaces foreach --all --parallel run test:ci",
"coverage": "yarn workspaces foreach --since --parallel run coverage",
"version:prepare": "yarn changeset version && yarn workspaces foreach --all --parallel run version:update && yarn install --no-immutable",
"version:check": "yarn changeset status",

@ -13,5 +13,5 @@ optimizer_runs = 999_999
verbosity = 4
[rpc_endpoints]
mainnet = "https://rpc.ankr.com/eth"
optimism = "https://rpc.ankr.com/optimism"
mainnet = "https://eth.merkle.io"
optimism = "https://optimism.llamarpc.com"

@ -54,6 +54,7 @@
"storage": "./storage.sh",
"prettier": "prettier --write ./contracts ./test",
"test": "hardhat test && forge test -vvv",
"test:ci": "hardhat test && forge test --no-match-test testFork -vvv",
"gas": "forge snapshot",
"gas-ci": "yarn gas --check --tolerance 2 || (echo 'Manually update gas snapshot' && exit 1)",
"slither": "slither ."

@ -75,8 +75,8 @@ contract OPStackIsmTest is Test {
function setUp() public {
// block numbers to fork from, chain data is cached to ../../forge-cache/
mainnetFork = vm.createFork(vm.rpcUrl("mainnet"), 17_586_909);
optimismFork = vm.createFork(vm.rpcUrl("optimism"), 106_233_774);
mainnetFork = vm.createFork(vm.rpcUrl("mainnet"), 18_992_500);
optimismFork = vm.createFork(vm.rpcUrl("optimism"), 114_696_811);
testRecipient = new TestRecipient();

@ -35,6 +35,7 @@
"lint": "eslint . --ext .ts",
"prettier": "prettier --write ./src ./examples",
"test": "mocha --config .mocharc.json",
"test:ci": "yarn test",
"version:update": "echo \"export const VERSION = '$npm_package_version';\" > src/version.ts"
},
"files": [

@ -56,6 +56,7 @@
"lint": "solhint contracts/**/*.sol && eslint . --ext .ts",
"prettier": "prettier --write ./contracts ./src",
"test": "hardhat test ./src/test/**/*.test.ts",
"test:ci": "yarn test",
"sync": "ts-node scripts/sync-with-template-repo.ts"
},
"types": "dist/src/index.d.ts",

@ -68,7 +68,8 @@
"announce": "hardhat announce --network localhost",
"node": "hardhat node",
"prettier": "prettier --write *.ts ./src ./config ./scripts ./test",
"test": "mocha --config ../sdk/.mocharc.json test/agents.test.ts"
"test": "mocha --config ../sdk/.mocharc.json test/agents.test.ts",
"test:ci": "yarn test"
},
"peerDependencies": {
"@ethersproject/abi": "*"

@ -61,6 +61,7 @@
"prepublishOnly": "yarn build",
"prettier": "prettier --write ./src",
"test": "yarn test:unit && yarn test:hardhat && yarn test:foundry",
"test:ci": "yarn test:unit --exclude './src/**/SmartProvider.test.ts' && yarn test:hardhat && yarn test:foundry",
"test:unit": "mocha --config .mocharc.json './src/**/*.test.ts' --exit",
"test:hardhat": "hardhat test $(find ./src -name \"*.hardhat-test.ts\")",
"test:metadata": "ts-node ./src/test/metadata-check.ts",

@ -30,7 +30,8 @@
"clean": "rm -rf ./dist",
"check": "tsc --noEmit",
"prettier": "prettier --write ./src",
"test": "mocha --config .mocharc.json './src/**/*.test.ts'"
"test": "mocha --config .mocharc.json './src/**/*.test.ts'",
"test:ci": "yarn test"
},
"sideEffects": false,
"types": "dist/index.d.ts",

Loading…
Cancel
Save