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

Coerce sources path to absolute path if necessary #866

Merged
merged 2 commits into from
Feb 21, 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
14 changes: 14 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ step_install_nvm: &step_install_nvm
nvm install v18
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV

step_install_foundry: &step_install_foundry
run:
name: "Install Foundry"
working_directory: ~/
environment:
SHELL: /bin/bash
command: |-
export PATH="$PATH:$HOME/.foundry/bin"
echo 'export PATH=$PATH:$HOME/.foundry/bin' >> $BASH_ENV
curl -L https://foundry.paradigm.xyz | bash
foundryup

jobs:
unit-test:
docker:
Expand Down Expand Up @@ -57,6 +70,7 @@ jobs:
steps:
- checkout
- <<: *step_install_nvm
- <<: *step_install_foundry
- run:
name: Hardhat E2E
command: |
Expand Down
4 changes: 4 additions & 0 deletions plugins/resources/nomiclabs.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ function normalizeConfig(config, args={}){
? sources = path.join(config.paths.sources, args.sources)
: sources = config.paths.sources;

if (!path.isAbsolute(sources)) {
sources = path.join(config.paths.root, sources);
}

if (config.solidity && config.solidity.compilers.length) {
config.viaIR = isUsingViaIR(config.solidity);
}
Expand Down
3 changes: 3 additions & 0 deletions scripts/nomiclabs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ npm install --silent
npm install --save-dev --silent $PR_PATH
cat package.json

npx hardhat init-foundry
cat foundry.toml

npx hardhat coverage

verifyCoverageExists
Expand Down