Skip to content

Commit df58e0a

Browse files
authored
Coerce sources path to absolute path if necessary (#866)
1 parent 7ad7288 commit df58e0a

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

.circleci/config.yml

+14
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ step_install_nvm: &step_install_nvm
1515
nvm install v18
1616
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
1717
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV
18+
19+
step_install_foundry: &step_install_foundry
20+
run:
21+
name: "Install Foundry"
22+
working_directory: ~/
23+
environment:
24+
SHELL: /bin/bash
25+
command: |-
26+
export PATH="$PATH:$HOME/.foundry/bin"
27+
echo 'export PATH=$PATH:$HOME/.foundry/bin' >> $BASH_ENV
28+
curl -L https://foundry.paradigm.xyz | bash
29+
foundryup
30+
1831
jobs:
1932
unit-test:
2033
docker:
@@ -57,6 +70,7 @@ jobs:
5770
steps:
5871
- checkout
5972
- <<: *step_install_nvm
73+
- <<: *step_install_foundry
6074
- run:
6175
name: Hardhat E2E
6276
command: |

plugins/resources/nomiclabs.utils.js

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ function normalizeConfig(config, args={}){
3636
? sources = path.join(config.paths.sources, args.sources)
3737
: sources = config.paths.sources;
3838

39+
if (!path.isAbsolute(sources)) {
40+
sources = path.join(config.paths.root, sources);
41+
}
42+
3943
if (config.solidity && config.solidity.compilers.length) {
4044
config.viaIR = isUsingViaIR(config.solidity);
4145
}

scripts/nomiclabs.sh

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ npm install --silent
5050
npm install --save-dev --silent $PR_PATH
5151
cat package.json
5252

53+
npx hardhat init-foundry
54+
cat foundry.toml
55+
5356
npx hardhat coverage
5457

5558
verifyCoverageExists

0 commit comments

Comments
 (0)