From 077ea26387c271ccadeb51951f660a2e21a233b7 Mon Sep 17 00:00:00 2001 From: Mikhail <16622558+mmv08@users.noreply.github.com> Date: Tue, 14 May 2024 11:15:09 +0200 Subject: [PATCH] fix github actions --- .github/workflows/certora_4337.yml | 9 +++- .github/workflows/ci.yml | 11 +++-- .github/workflows/ci_4337.yml | 28 +++++++---- .github/workflows/ci_4337_gas_metering.yml | 10 ++-- .github/workflows/ci_4337_local_bundler.yml | 13 +++-- .../workflows/ci_4337_upstream_bundler.yml | 11 +++-- .github/workflows/ci_passkey.yml | 48 ++++++++++++------- .github/workflows/ci_passkey_example.yml | 9 ++-- .npmrc | 1 + .prettierignore | 2 + modules/4337/certora/conf/Safe4337Module.conf | 4 +- .../conf/TransactionExecutionMethods.conf | 4 +- .../conf/ValidationDataLastBitOne.conf | 4 +- modules/passkey/package.json | 2 +- pnpm-workspace.yaml | 2 +- 15 files changed, 107 insertions(+), 51 deletions(-) diff --git a/.github/workflows/certora_4337.yml b/.github/workflows/certora_4337.yml index d30ad49f4..d6dd5c0ee 100644 --- a/.github/workflows/certora_4337.yml +++ b/.github/workflows/certora_4337.yml @@ -23,12 +23,17 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 + - name: Install python uses: actions/setup-python@v4 with: { python-version: 3.11 } - name: Install certora cli - run: pip install -Iv certora-cli==6.1.3 + run: pip install -Iv certora-cli==7.3.0 - name: Install solc run: | @@ -37,7 +42,7 @@ jobs: sudo mv solc-static-linux /usr/local/bin/solc8.23 - name: Install dependencies - run: pnpm install + run: pnpm install - name: Verify rule ${{ matrix.rule }} working-directory: ./modules/4337 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce442acd5..bb310d45e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,10 +6,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 - uses: actions/setup-node@v4 with: node-version: 20.x - cache: npm - cache-dependency-path: package-lock.json - - run: npm ci - - run: npm run fmt:global-check + cache: pnpm + - run: pnpm install + - run: pnpm run fmt:global-check diff --git a/.github/workflows/ci_4337.yml b/.github/workflows/ci_4337.yml index df4b06f04..8236bc89e 100644 --- a/.github/workflows/ci_4337.yml +++ b/.github/workflows/ci_4337.yml @@ -9,13 +9,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 - uses: actions/setup-node@v4 with: node-version: 20.x - cache: npm - cache-dependency-path: package-lock.json + cache: pnpm - run: | - npm ci + pnpm install npm run coverage -w modules/4337 - name: Coveralls uses: coverallsapp/github-action@master @@ -26,24 +29,31 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 - uses: actions/setup-node@v4 with: node-version: 20.x - cache: npm - cache-dependency-path: package-lock.json + cache: pnpm - run: | - npm ci + pnpm install npm run test:4337 -w modules/4337 lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 - uses: actions/setup-node@v4 with: node-version: 20.x - cache: npm - cache-dependency-path: package-lock.json + cache: pnpm - run: | - npm ci + pnpm install npm run lint -w modules/4337 npm run fmt:check -w modules/4337 diff --git a/.github/workflows/ci_4337_gas_metering.yml b/.github/workflows/ci_4337_gas_metering.yml index c4b5a541f..c99a6e5c3 100644 --- a/.github/workflows/ci_4337_gas_metering.yml +++ b/.github/workflows/ci_4337_gas_metering.yml @@ -10,6 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} @@ -17,6 +21,6 @@ jobs: - name: Install dependencies run: pnpm install - run: | - npm run fmt:check -w examples/4337-gas-metering - npm run lint -w examples/4337-gas-metering - npm run build -w examples/4337-gas-metering + pnpm run --filter "@safe-global/safe-modules-example-4337-gas-metering" fmt:check + pnpm run --filter "@safe-global/safe-modules-example-4337-gas-metering" lint + pnpm run --filter "@safe-global/safe-modules-example-4337-gas-metering" build diff --git a/.github/workflows/ci_4337_local_bundler.yml b/.github/workflows/ci_4337_local_bundler.yml index 62e4dddf1..099478eda 100644 --- a/.github/workflows/ci_4337_local_bundler.yml +++ b/.github/workflows/ci_4337_local_bundler.yml @@ -9,11 +9,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 + - uses: actions/setup-node@v4 with: node-version: 20.x - cache: npm - cache-dependency-path: package-lock.json + cache: pnpm - run: | - npm ci - npm run lint -w packages/4337-local-bundler + pnpm install + pnpm run --filter "@safe-global/safe-4337-local-bundler" lint diff --git a/.github/workflows/ci_4337_upstream_bundler.yml b/.github/workflows/ci_4337_upstream_bundler.yml index 4f7f857e8..340681ab1 100644 --- a/.github/workflows/ci_4337_upstream_bundler.yml +++ b/.github/workflows/ci_4337_upstream_bundler.yml @@ -15,12 +15,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 + - uses: actions/setup-node@v4 with: node-version: 20.x - cache: npm - cache-dependency-path: package-lock.json + cache: pnpm - run: | - npm ci + pnpm install npm run test:4337:upstream -w modules/4337 npm run test:4337:upstream -w modules/passkey diff --git a/.github/workflows/ci_passkey.yml b/.github/workflows/ci_passkey.yml index 05968a442..abd726b8d 100644 --- a/.github/workflows/ci_passkey.yml +++ b/.github/workflows/ci_passkey.yml @@ -9,14 +9,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 - uses: actions/setup-node@v4 with: node-version: 20.x - cache: npm - cache-dependency-path: package-lock.json + cache: pnpm - run: | - npm ci - npm run coverage -w modules/passkey + pnpm install + pnpm run --filter "@safe-global/safe-passkey" coverage - uses: coverallsapp/github-action@master with: path-to-lcov: modules/passkey/coverage/lcov.info @@ -25,37 +28,46 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 - uses: actions/setup-node@v4 with: node-version: 20.x - cache: npm - cache-dependency-path: package-lock.json + cache: pnpm - run: | - npm ci - npm run lint -w modules/passkey - npm run fmt:check -w modules/passkey - npm run build -w modules/passkey + pnpm install + pnpm run --filter "@safe-global/safe-passkey" lint -w + pnpm run --filter "@safe-global/safe-passkey" fmt:check + pnpm run --filter "@safe-global/safe-passkey" build e2e: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 - uses: actions/setup-node@v4 with: node-version: 20.x - cache: npm - cache-dependency-path: package-lock.json + cache: pnpm - run: | - npm ci - npm run test:4337 -w modules/passkey + pnpm install + pnpm run --filter "@safe-global/safe-passkey" test:4337 benchmark: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 - uses: actions/setup-node@v4 with: node-version: 20.x - cache: npm - cache-dependency-path: package-lock.json + cache: pnpm - run: | - npm ci - npm run bench -w modules/passkey + pnpm install + pnpm run run --filter "@safe-global/safe-passkey" bench diff --git a/.github/workflows/ci_passkey_example.yml b/.github/workflows/ci_passkey_example.yml index 57ac18d63..141055ada 100644 --- a/.github/workflows/ci_passkey_example.yml +++ b/.github/workflows/ci_passkey_example.yml @@ -11,13 +11,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 9 - uses: actions/setup-node@v4 with: node-version: 20.x - cache: npm - cache-dependency-path: package-lock.json + cache: pnpm - run: | - npm ci + pnpm install npm run lint -w examples/4337-passkeys npm run build -w examples/4337-passkeys env: diff --git a/.npmrc b/.npmrc index 3e775efb0..0e74e4411 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ auto-install-peers=true +shamefully-hoist=true \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index dcc491490..97ce69751 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,5 @@ +# They're excluded on the global level because each of them defines its own linting and formatting rules examples/** modules/** packages/** +pnpm-lock.yaml \ No newline at end of file diff --git a/modules/4337/certora/conf/Safe4337Module.conf b/modules/4337/certora/conf/Safe4337Module.conf index 7f6635616..abaf4149d 100644 --- a/modules/4337/certora/conf/Safe4337Module.conf +++ b/modules/4337/certora/conf/Safe4337Module.conf @@ -8,12 +8,14 @@ "msg": "Safe4337Module: General Ruleset", "optimistic_hashing": true, "optimistic_loop": true, + "optimistic_fallback": true, "process": "emv", "prover_args": [ - " -optimisticFallback true -s z3 -copyLoopUnroll 5 -mediumTimeout 5" + "-s z3 -copyLoopUnroll 5 -mediumTimeout 5" ], "rule_sanity": "basic", "solc": "solc8.23", + "solc_allow_path": "../../node_modules", "verify": "Safe4337Module:certora/specs/Safe4337Module.spec", "packages": [ "@account-abstraction=../../node_modules/@account-abstraction", diff --git a/modules/4337/certora/conf/TransactionExecutionMethods.conf b/modules/4337/certora/conf/TransactionExecutionMethods.conf index cac80abbd..ab74ddb44 100644 --- a/modules/4337/certora/conf/TransactionExecutionMethods.conf +++ b/modules/4337/certora/conf/TransactionExecutionMethods.conf @@ -8,12 +8,14 @@ "msg": "Safe4337Module: TransactionExecutionMethods Ruleset", "optimistic_hashing": true, "optimistic_loop": true, + "optimistic_fallback": true, "process": "emv", "prover_args": [ - " -optimisticFallback true -s z3 -copyLoopUnroll 5 -mediumTimeout 5 -depth 30" + "-s z3 -copyLoopUnroll 5 -mediumTimeout 5 -depth 30" ], "rule_sanity": "advanced", "solc": "solc8.23", + "solc_allow_path": "../../node_modules", "verify": "Safe4337Module:certora/specs/TransactionExecutionMethods.spec", "packages": [ "@account-abstraction=../../node_modules/@account-abstraction", diff --git a/modules/4337/certora/conf/ValidationDataLastBitOne.conf b/modules/4337/certora/conf/ValidationDataLastBitOne.conf index 98b4f1c1c..b3c06fe24 100644 --- a/modules/4337/certora/conf/ValidationDataLastBitOne.conf +++ b/modules/4337/certora/conf/ValidationDataLastBitOne.conf @@ -8,12 +8,14 @@ "msg": "Safe4337Module: ValidationDataLastBitOne when checkSignatures revert", "optimistic_hashing": true, "optimistic_loop": true, + "optimistic_fallback": true, "process": "emv", "prover_args": [ - " -optimisticFallback true -s z3 -copyLoopUnroll 5 -mediumTimeout 5 -depth 30" + "-s z3 -copyLoopUnroll 5 -mediumTimeout 5 -depth 30" ], "rule_sanity": "basic", "solc": "solc8.23", + "solc_allow_path": "../../node_modules", "verify": "Safe4337Module:certora/specs/ValidationDataLastBitOne.spec", "packages": [ "@account-abstraction=../../node_modules/@account-abstraction", diff --git a/modules/passkey/package.json b/modules/passkey/package.json index b603b0c32..0d37c586a 100644 --- a/modules/passkey/package.json +++ b/modules/passkey/package.json @@ -1,6 +1,6 @@ { "name": "@safe-global/safe-passkey", - "version": "0.2.0-alpha.1", + "version": "0.2.0-alpha.2", "author": "@safe-global", "description": "Safe Passkey Owner", "homepage": "https://github.com/safe-global/safe-modules/tree/main/modules/passkey", diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index bbc0b1eb7..f956dbf8d 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,4 @@ packages: - 'examples/*' - 'packages/*' - - 'modules/*' \ No newline at end of file + - 'modules/*'