Skip to content

Commit

Permalink
cleanup ci
Browse files Browse the repository at this point in the history
- using github.ref_name
- add mention of submodules to the README
  • Loading branch information
jac18281828 committed Aug 10, 2023
1 parent 4c60415 commit 5f58187
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 47 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ out/
broadcast/
node_modules
README.md
RELEASE.txt
SECURITY.md
SECURITY.md.asc
public_key.asc
build.sh
CHANGELOG.md
LICENSE
5 changes: 3 additions & 2 deletions .github/workflows/testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ env:
GOVERNANCE_BUILDER_ADDRESS: "0x9fB5a925E61c31617129B5D030808939DADA99f7"
TREASURY_BUILDER_ADDRESS: "0x49753b58270ae454d4ec555ff88294a4fab01660"
ECDSA_LIB_ADDRESS: "0xe9e21aaEaEad9c57C1F4c622915fFB54f9Ebe338"
RELEASE_TAG: ${{ github.ref_name }}

jobs:
check:
Expand Down Expand Up @@ -54,8 +55,8 @@ jobs:
with:
draft: false
prerelease: false
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}
body_path: CHANGELOG.md

- name: Deploy Constant Library
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
branch = v1.5.6
branch = v1.6.0
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
}
}
]
}
}
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
}
]
}
}
}
12 changes: 12 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,25 @@
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "preinstall",
"type": "shell",
"command": "forge install",
"options": {
"cwd": "${workspaceFolder}"
},
"group": {
"kind": "build"
}
},
{
"label": "install",
"type": "shell",
"command": "yarn install --dev",
"options": {
"cwd": "${workspaceFolder}"
},
"dependsOn": "preinstall",
"group": {
"kind": "build"
}
Expand Down
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,29 @@ Collective Governance has been designed from the ground up to be very easy to us
| CommunityBuilder | 0x011b543b69236aca83406edc051e8a6dd3bcda1c | 0.9.7 |
| GovernanceBuilder | 0x2c57560BF19b7c088488104D02506D87f63e414C | 0.9.7 |

### Submodules

This repo is using submodules. Check out the repository with the `--recursive` argument:

```
$ git clone --recursive https://github.com/collectivexyz/Revolution2
```

Or simply init submodules from within the codebase

```
$ git submodule update --recursive --init -f
```

### Command line build using docker

1. docker build . -t collective-governance-v1:1
```
$ docker build . -t collective-governance-v1:1
```

### VS Code

Using the Remote module in VSCode simply reopen the project in it's container.
Using the Remote Containers extension in VSCode simply reopen the project in it's container.

`Reopen in Container`

Expand Down
6 changes: 0 additions & 6 deletions RELEASE.txt

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
},
"scripts": {
"build": "forge build --sizes",
"prettier:check": "prettier --check \"(contracts|test)/**.sol\"",
"prettier:fix": "prettier --write \"(contracts|test)/**.sol\"",
"hint": "solhint contracts/**/*.sol test/**/*.sol",
"prettier:check": "prettier --check \"(contracts|test|script)/**.sol\"",
"prettier:fix": "prettier --write \"(contracts|test|script)/**.sol\"",
"hint": "solhint contracts/**/*.sol test/**/*.sol script/**/*.sol",
"test": "forge test -vvv",
"clean": "forge cache clean && if [ -d out ]; then forge clean; fi"
},
Expand Down
2 changes: 1 addition & 1 deletion script/UpgradeCommunityClass.sol
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ contract UpgradeCommunityClass is Script {
_prototype.maximumVoteDuration(),
_prototype.maximumGasUsedRebate(),
_prototype.maximumBaseFeeRebate(),
uint8(_implVersion.version())
uint8(_implVersion.version())
);
vm.stopBroadcast();
}
Expand Down
32 changes: 4 additions & 28 deletions test/governance/GovernanceBuilder.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,7 @@ contract GovernanceBuilderTest is Test {
vm.prank(_VOTER1, _VOTER1);
uint256 proposalId = _gov.propose();
assertEq(_class.minimumVoteDelay(), testVoteDelay);
vm.expectRevert(
abi.encodeWithSelector(
Storage.DelayNotPermitted.selector,
proposalId,
testVoteDelay - 1,
testVoteDelay
)
);
vm.expectRevert(abi.encodeWithSelector(Storage.DelayNotPermitted.selector, proposalId, testVoteDelay - 1, testVoteDelay));
vm.prank(_VOTER1, _VOTER1);
_gov.configure(proposalId, 100, testVoteDelay - 1, Constant.MINIMUM_VOTE_DURATION);
}
Expand All @@ -106,14 +99,7 @@ contract GovernanceBuilderTest is Test {
vm.prank(_VOTER1, _VOTER1);
uint256 proposalId = _gov.propose();
assertEq(_class.maximumVoteDelay(), testVoteDelay);
vm.expectRevert(
abi.encodeWithSelector(
Storage.DelayNotPermitted.selector,
proposalId,
testVoteDelay + 1,
testVoteDelay
)
);
vm.expectRevert(abi.encodeWithSelector(Storage.DelayNotPermitted.selector, proposalId, testVoteDelay + 1, testVoteDelay));
vm.prank(_VOTER1, _VOTER1);
_gov.configure(proposalId, 100, testVoteDelay + 1, Constant.MINIMUM_VOTE_DURATION);
}
Expand All @@ -135,12 +121,7 @@ contract GovernanceBuilderTest is Test {
uint256 proposalId = _gov.propose();
assertEq(_class.minimumVoteDuration(), testVoteDuration + 1);
vm.expectRevert(
abi.encodeWithSelector(
Storage.DurationNotPermitted.selector,
proposalId,
testVoteDuration,
testVoteDuration + 1
)
abi.encodeWithSelector(Storage.DurationNotPermitted.selector, proposalId, testVoteDuration, testVoteDuration + 1)
);
vm.prank(_VOTER1, _VOTER1);
_gov.configure(proposalId, 100, Constant.MINIMUM_VOTE_DELAY, testVoteDuration);
Expand All @@ -163,12 +144,7 @@ contract GovernanceBuilderTest is Test {
uint256 proposalId = _gov.propose();
assertEq(_class.maximumVoteDuration(), testVoteDuration);
vm.expectRevert(
abi.encodeWithSelector(
Storage.DurationNotPermitted.selector,
proposalId,
testVoteDuration + 1,
testVoteDuration
)
abi.encodeWithSelector(Storage.DurationNotPermitted.selector, proposalId, testVoteDuration + 1, testVoteDuration)
);
vm.prank(_VOTER1, _VOTER1);
_gov.configure(proposalId, 100, Constant.MINIMUM_VOTE_DELAY, testVoteDuration + 1);
Expand Down

0 comments on commit 5f58187

Please sign in to comment.