Skip to content

Commit

Permalink
Merge pull request #11 from tom2o17/fix/default-tests
Browse files Browse the repository at this point in the history
Fix Default Test Cases + Build/Test/lint in CI
  • Loading branch information
DrakeEvans authored Dec 13, 2023
2 parents 5ffbe72 + 8f471c4 commit 62f0941
Show file tree
Hide file tree
Showing 8 changed files with 178 additions and 57 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: master
pull_request:
branches: master
jobs:
build:
timeout-minutes: 60
runs-on: ubuntu-latest
env:
MAINNET_URL: ${{ secrets.MAINNET_RPC_URL }}
steps:
- uses: actions/setup-node@v2
with:
node-version: 16.x
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 8.11.0

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- run: pnpm i
- run: pnpm lint:check
- run: forge build
- run: forge test
34 changes: 0 additions & 34 deletions .github/workflows/test.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "all",
"plugins": ["prettier-plugin-svelte", "prettier-plugin-solidity"],
"overrides": [
{
"files": "*.sol",
"options": {
"bracketSpacing": true,
"tabWidth": 4,
"singleQuote": false,
"compiler": ">=0.8.0"
"parser": "solidity-parse"
}
}
]
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"test": "test"
},
"scripts": {
"lint:check": "prettier --check '**/*.(sol)' --ignore-path=.gitignore",
"lint:fix-all": "prettier --write '**/*.(sol)' --ignore-path=.gitignore",
"test": "forge test",
"prepare": "husky install",
"format": "forge fmt src && prettier --config ./.prettierrc.json --write src && forge fmt test && prettier --config ./.prettierrc.json --write test",
Expand All @@ -21,17 +23,18 @@
"@openzeppelin/contracts": "^4.9.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.0",
"prettier": "^2.8.6",
"prettier": "^2.8.8",
"prettier-plugin-solidity": "^1.1.3",
"prettier-plugin-svelte": "^3.1.2",
"solhint": "^3.4.1",
"solhint-plugin-prettier": "^0.0.5",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
},
"dependencies": {
"ds-test": "github:dapphub/ds-test",
"solidity-bytes-utils": "github:GNSPS/solidity-bytes-utils",
"forge-std": "github:foundry-rs/forge-std#e8a047e3f40f13fa37af6fe14e6e06283d9a060e",
"frax-standard-solidity": "github:FraxFinance/frax-standard-solidity"
"frax-standard-solidity": "github:FraxFinance/frax-standard-solidity",
"solidity-bytes-utils": "github:GNSPS/solidity-bytes-utils"
}
}
Loading

0 comments on commit 62f0941

Please sign in to comment.