-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Safe interface to ISafeTest for test usage. (#491)
* Add GitHub Actions workflow for safe-modules-allowance * Update package.json scripts for linting and formatting * Update import statements in test helpers to use ISafeTest This PR was needed to fix the allowance module tests broken by the interface name collision introduced in #489, also with the GitHub action we're less likely to break the tests again
- Loading branch information
Showing
5 changed files
with
57 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: safe-modules-allowance | ||
on: | ||
push: | ||
paths: | ||
- 'modules/allowances/**' | ||
|
||
jobs: | ||
tests: | ||
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: pnpm | ||
- run: | | ||
pnpm install | ||
pnpm run --filter "@safe-global/safe-allowance-module" coverage | ||
- uses: coverallsapp/github-action@master | ||
with: | ||
path-to-lcov: modules/allowances/coverage/lcov.info | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
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: pnpm | ||
- run: | | ||
pnpm install | ||
pnpm run --filter "@safe-global/safe-allowance-module" lint | ||
pnpm run --filter "@safe-global/safe-allowance-module" fmt:check | ||
pnpm run --filter "@safe-global/safe-allowance-module" build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,15 @@ | |
"prepare": "pnpm run clean && npm run build", | ||
"lint": "pnpm run lint:sol && npm run lint:ts", | ||
"lint:sol": "solhint 'contracts/**/*.sol'", | ||
"lint:ts": "eslint 'tasks/**/*.ts' 'test/**/*.ts' --max-warnings 0 --fix", | ||
"fmt": "pnpm run fmt:sol && npm run fmt:ts", | ||
"fmt:sol": "prettier 'contracts/**/*.sol' -w", | ||
"fmt:ts": "prettier 'tasks/**/*.ts' 'test/**/*.ts' -w" | ||
"lint:sol:fix": "solhint 'contracts/**/*.sol' --fix", | ||
"lint:ts": "eslint 'tasks/**/*.ts' 'test/**/*.ts' --max-warnings 0", | ||
"lint:ts:fix": "eslint 'tasks/**/*.ts' 'test/**/*.ts' --max-warnings 0 --fix", | ||
"fmt": "pnpm run fmt:sol:write && npm run fmt:ts:write", | ||
"fmt:check": "pnpm run fmt:sol:check && npm run fmt:ts:check", | ||
"fmt:sol:check": "prettier 'contracts/**/*.sol' --check", | ||
"fmt:ts:check": "prettier 'tasks/**/*.ts' 'test/**/*.ts' --check", | ||
"fmt:sol:write": "prettier 'contracts/**/*.sol' --write", | ||
"fmt:ts:write": "prettier 'tasks/**/*.ts' 'test/**/*.ts' --write" | ||
}, | ||
"author": "[email protected]", | ||
"license": "ISC", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters