Skip to content

Commit

Permalink
fix github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mmv08 committed May 14, 2024
1 parent 96dc288 commit 077ea26
Show file tree
Hide file tree
Showing 15 changed files with 107 additions and 51 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/certora_4337.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
28 changes: 19 additions & 9 deletions .github/workflows/ci_4337.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
10 changes: 7 additions & 3 deletions .github/workflows/ci_4337_gas_metering.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,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: ${{ matrix.node-version }}
cache: 'pnpm'
- 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
13 changes: 9 additions & 4 deletions .github/workflows/ci_4337_local_bundler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 8 additions & 3 deletions .github/workflows/ci_4337_upstream_bundler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
48 changes: 30 additions & 18 deletions .github/workflows/ci_passkey.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
9 changes: 6 additions & 3 deletions .github/workflows/ci_passkey_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
auto-install-peers=true
shamefully-hoist=true
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion modules/4337/certora/conf/Safe4337Module.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion modules/4337/certora/conf/TransactionExecutionMethods.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion modules/4337/certora/conf/ValidationDataLastBitOne.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion modules/passkey/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
packages:
- 'examples/*'
- 'packages/*'
- 'modules/*'
- 'modules/*'

0 comments on commit 077ea26

Please sign in to comment.