Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant scripts #1267

Merged
merged 9 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 15 additions & 40 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ job_python: &job_python
username: colonyci
password: $COLONYCI_DOCKERHUB_PASSWORD
working_directory: ~/colonyNetwork
step_setup_pnpm: &step_setup_pnpm #Only used in python image, as node image comes with it
step_setup_pnpm: &step_setup_pnpm # Only used in python image, as node image comes with it
run:
name: "Install pnpm"
command: sudo npm i -g [email protected] #Same version as in cimg/node:20.11.0
Expand All @@ -41,17 +41,6 @@ step_pull_solc_docker: &step_pull_solc_docker
run:
name: "Pull solc docker image"
command: docker pull ethereum/solc:0.5.8
step_setup_slither: &step_setup_slither
run:
name: "Setup slither analyser https://github.com/crytic/slither"
command: |
wget https://github.com/ethereum/solidity/releases/download/v0.5.8/solc-static-linux
chmod +x solc-static-linux
sudo mv solc-static-linux /usr/local/bin/solc
pip install slither-analyzer
pip install solc-select
solc-select install 0.8.25
solc-select use 0.8.25
step_install_nvm: &step_install_nvm
run:
name: "Install nvm"
Expand Down Expand Up @@ -147,7 +136,6 @@ jobs:
environment:
NODE_OPTIONS: --max-old-space-size=6144
- <<: *step_save_cache
# Save test results
- store_test_results:
path: test-results.xml
- store_artifacts:
Expand All @@ -170,7 +158,6 @@ jobs:
environment:
NODE_OPTIONS: --max-old-space-size=6144
- <<: *step_save_cache
# Save test results
- store_test_results:
path: test-results.xml
- store_artifacts:
Expand All @@ -186,6 +173,7 @@ jobs:
version: docker23
- <<: *step_pull_solc_docker
- <<: *step_setup_global_packages
- <<: *step_install_lsof
- run:
name: "Download parity"
command: wget https://releases.parity.io/ethereum/v2.7.2/x86_64-unknown-linux-gnu/parity
Expand Down Expand Up @@ -214,31 +202,21 @@ jobs:
sed -i "s/000000000000000000000000000000deadbeef16/$(parity account new --chain ./parity-genesis.json --keys-path ./keys --password ./parityPassword)/g" ./parity-genesis.json
sed -i "s/000000000000000000000000000000deadbeef17/$(parity account new --chain ./parity-genesis.json --keys-path ./keys --password ./parityPassword)/g" ./parity-genesis.json
sed -i "s/000000000000000000000000000000deadbeef18/$(parity account new --chain ./parity-genesis.json --keys-path ./keys --password ./parityPassword)/g" ./parity-genesis.json
- <<: *step_install_lsof
- run:
name: "Running gas cost tests"
command: pnpm run test:contracts:gas && npx codechecks
- run:
name: "Running ganache upgrade tests"
command: pnpm run test:contracts:upgrade:ganache
environment:
NODE_OPTIONS: --max-old-space-size=6144
# name: "Running parity upgrade tests"
# command: pnpm run test:contracts:upgrade:parity
# environment:
# NODE_OPTIONS: --max-old-space-size=6144
- run:
name: "Running gas cost tests"
command: pnpm run test:contracts:gasCosts && npx codechecks
- <<: *step_install_lsof
- run:
name: "Reset chains"
command: rm -rf ganache-chain-db*
- run:
name: "Reset ganache chain"
command: rm -rf ganache-chain-db*
- run:
name: "Running patricia tree tests"
command: pnpm run test:contracts:patricia
- <<: *step_save_cache
# Save test results
- store_test_results:
path: test-results.xml
- store_artifacts:
Expand Down Expand Up @@ -371,7 +349,6 @@ jobs:
command: pnpm run test:contracts:bridging:1:coverage
environment:
NODE_OPTIONS: --max-old-space-size=6144
- <<: *step_install_lsof
- run:
name: "Running coverage tests for foreign-side of bridge"
command: pnpm run test:contracts:bridging:2:coverage
Expand Down Expand Up @@ -457,7 +434,6 @@ jobs:
- run:
name: "Merge coverage runs and check coverage thresholds"
command: pnpm run check:coverage
# Save coverage artifacts
- store_artifacts:
path: coverage-merged
security-analysis:
Expand All @@ -470,7 +446,16 @@ jobs:
version: docker23
- <<: *step_pull_solc_docker
- <<: *step_setup_global_packages
- <<: *step_setup_slither
- run:
name: "Setup slither analyser https://github.com/crytic/slither"
command: |
wget https://github.com/ethereum/solidity/releases/download/v0.5.8/solc-static-linux
chmod +x solc-static-linux
sudo mv solc-static-linux /usr/local/bin/solc
pip install slither-analyzer
pip install solc-select
solc-select install 0.8.25
solc-select use 0.8.25
- run:
name: "Slither analysis"
command: pnpm run test:security:slither
Expand Down Expand Up @@ -534,13 +519,3 @@ workflows:
- coverage-test-chainid
- coverage-test-upgrade
- coverage-test-bridging
# nightly:
# triggers:
# - schedule:
# cron: "0 1 * * *" # 1am UTC
# filters:
# branches:
# only:
# - develop
# jobs:
# - end-to-end-tests
5 changes: 0 additions & 5 deletions .solcover.extensions.js

This file was deleted.

5 changes: 0 additions & 5 deletions .solcover.reputation.js

This file was deleted.

4 changes: 2 additions & 2 deletions .solcover.chainid.js → .solcover/chainid.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const config = require("./.solcover.js")
const config = require("./solcover.js")

config.providerOptions.network_id = parseInt(process.env.CHAIN_ID, 10);
config.providerOptions._chainId = parseInt(process.env.CHAIN_ID, 10);
config.providerOptions._chainIdRpc = parseInt(process.env.CHAIN_ID, 10);
config.istanbulFolder = `./coverage-chainid-${process.env.CHAIN_ID}`
module.exports = config
module.exports = config
5 changes: 2 additions & 3 deletions .solcover.crosschain.js → .solcover/crosschain.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const config = require("./.solcover.js")
const ethers = require("ethers");
const config = require("./solcover.js")

const { FORKED_XDAI_CHAINID } = require("./helpers/constants");
const { FORKED_XDAI_CHAINID } = require("./../helpers/constants");

config.istanbulFolder = `./coverage-cross-chain-${process.env.HARDHAT_FOREIGN === "true" ? "foreign" : "home"}`
console.log(`Coverage folder: ${config.istanbulFolder}`)
Expand Down
5 changes: 5 additions & 0 deletions .solcover/extensions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const config = require("./solcover.js")

config.istanbulFolder = "./coverage-extensions"

module.exports = config
5 changes: 5 additions & 0 deletions .solcover/reputation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const config = require("./solcover.js")

config.istanbulFolder = "./coverage-reputation"

module.exports = config
16 changes: 1 addition & 15 deletions .solcover.js → .solcover/solcover.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
const { execSync } = require("child_process");
const log = console.log;

// Copies pre-built token artifacts to .coverage_artifacts/contracts
function provisionTokenContracts(config){
let output;
const provisionColonyToken = `BUILD_DIR="build-coverage" bash ./scripts/provision-token-contracts.sh`;

log('Provisioning ColonyToken contracts...')
output = execSync(provisionColonyToken);
log(output.toString())
}

module.exports = {
configureYulOptimizer: true,
skipFiles: [
Expand All @@ -26,7 +13,7 @@ module.exports = {
},
providerOptions: {
network_id: 1999,
account_keys_path: "./ganache-accounts.json",
account_keys_path: "./../ganache-accounts.json",
vmErrorsOnRPCResponse: false,
total_accounts: 18,
_chainId: 265669100,
Expand All @@ -53,7 +40,6 @@ module.exports = {
{secretKey:"0xfe6066af949ec3c2c88ac10f47907c6d4e200c37b28b5af49e7d0ffd5c301c5c","balance":"100000000000000000000"}
]
},
onCompileComplete: provisionTokenContracts,
istanbulFolder: "./coverage-contracts",
modifierWhitelist: ["always", "onlyMiningChain", "onlyNotMiningChain"],
}
5 changes: 3 additions & 2 deletions .solcover.upgrade.js → .solcover/upgrade.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const config = require("./solcover.js")

const { execSync } = require("child_process");
const config = require("./.solcover.js")

function getFilesToSkip(){
const array = [
Expand All @@ -16,4 +17,4 @@ function getFilesToSkip(){
config.istanbulFolder = "./coverage-upgrade"
config.skipFiles = getFilesToSkip();

module.exports = config
module.exports = config
128 changes: 0 additions & 128 deletions helpers/task-review-signing.js

This file was deleted.

6 changes: 0 additions & 6 deletions migrations/1_initial_migration.js

This file was deleted.

Loading