Skip to content

Commit

Permalink
Coerce sources path to absolute path if necessary (#866)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgewecke authored Feb 21, 2024
1 parent 7ad7288 commit df58e0a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
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

0 comments on commit df58e0a

Please sign in to comment.