Skip to content

Commit

Permalink
chore: merge latest base branch
Browse files Browse the repository at this point in the history
  • Loading branch information
philbow61 committed Oct 18, 2024
1 parent c389250 commit d45a22e
Show file tree
Hide file tree
Showing 23 changed files with 834 additions and 615 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/echidna.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
"test/integration/**/*" \
"test/unit/**/*" \
"test/utils/**/*" \
"script/**/"
"contracts/**/*"
- name: "Run Echidna"
uses: crytic/echidna-action@v2
Expand Down
50 changes: 27 additions & 23 deletions .github/workflows/lint_test.yaml
Original file line number Diff line number Diff line change
@@ -1,55 +1,59 @@
name: "CI"
name: CI

env:
FOUNDRY_PROFILE: "ci"
FOUNDRY_PROFILE: ci
ALFAJORES_RPC_URL: ${{secrets.ALFAJORES_RPC_URL}}
CELO_MAINNET_RPC_URL: ${{secrets.CELO_MAINNET_RPC_URL}}

on:
workflow_dispatch:
pull_request:
push:
branches:
- "main"
- "develop"
- main
- develop

permissions: read-all

jobs:
lint_and_test:
name: Lint & Test
runs-on: "ubuntu-latest"
runs-on: ubuntu-latest
steps:
- name: "Check out the repo"
uses: "actions/checkout@v3"
- name: Check out the repo
uses: actions/checkout@v3
with:
submodules: "recursive"
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: "Install Node.js"
uses: "actions/setup-node@v3"
- name: Install Node.js
uses: actions/setup-node@v3
with:
cache: "yarn"
cache: yarn
node-version: "20"

- name: "Install the Node.js dependencies"
run: "yarn install --immutable"
- name: Install the Node.js dependencies
run: yarn install --immutable

- name: "Lint the contracts"
run: "yarn lint"
- name: Lint the contracts
run: yarn lint

- name: "Add lint summary"
- name: Add lint summary
run: |
echo "## Lint" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
- name: "Show the Foundry config"
run: "forge config"
- name: Show the Foundry config
run: forge config

- name: "Run the tests"
run: "forge test"
- name: Run the tests
run: forge test

- name: "Check contract sizes"
run: "yarn run check-contract-sizes"
- name: Check contract sizes
run: yarn run check-contract-sizes

- name: "Add test summary"
- name: Add test summary
run: |
echo "## Tests" >> $GITHUB_STEP_SUMMARY
35 changes: 19 additions & 16 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,28 @@ trailingComma: all
plugins: [prettier-plugin-solidity]

overrides:
# General Config
- files: ["*.sol"]
options:
compiler: 0.5.17
- files: [contracts/interfaces/*.sol]
- files: [test/**/*.sol]
options:
compiler: ""

# File-specific Config
- files:
[
contracts/common/IERC20MintableBurnable.sol,
contracts/common/SafeERC20MintableBurnable.sol,
contracts/goodDollar/**/*.sol,
contracts/governance/**/*.sol,
contracts/interfaces/*.sol,
contracts/libraries/TradingLimits.sol,
contracts/oracles/Chainlink*.sol,
contracts/swap/Broker.sol,
contracts/tokens/patched/*.sol,
contracts/tokens/StableTokenV2.sol,
]
options:
compiler: 0.8.18
- files:
Expand All @@ -21,18 +39,3 @@ overrides:
- contracts/interfaces/IExchange.sol
options:
compiler: 0.5.17
- files: [contracts/tokens/patched/*.sol]
options:
compiler: 0.8.18
- files: [contracts/tokens/StableTokenV2.sol]
options:
compiler: 0.8.18
- files: [contracts/governance/**/*.sol]
options:
compiler: 0.8.18
- files: [test/**/*.sol]
options:
compiler: ""
- files: [contracts/oracles/Chainlink*.sol]
options:
compiler: 0.8.18
30 changes: 8 additions & 22 deletions .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,17 @@
"extends": "solhint:recommended",
"plugins": ["prettier"],
"rules": {
"no-global-import": "off",
"no-console": "off",
"code-complexity": ["error", 8],
"compiler-version": ["error", ">=0.5.13"],
"func-visibility": [
"error",
{
"ignoreConstructors": true
}
],
"max-line-length": ["error", 121],
"not-rely-on-time": "off",
"func-visibility": ["error", { "ignoreConstructors": true }],
"function-max-lines": ["error", 120],
"gas-custom-errors": "off",
"max-line-length": ["error", 121],
"no-console": "off",
"no-empty-blocks": "off",
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
],
"reason-string": [
"warn",
{
"maxLength": 64
}
]
"no-global-import": "off",
"not-rely-on-time": "off",
"prettier/prettier": ["error", { "endOfLine": "auto" }],
"reason-string": ["warn", { "maxLength": 64 }]
}
}
Loading

0 comments on commit d45a22e

Please sign in to comment.