Coerce sources path to absolute path if necessary (#866)

pull/868/head
cgewecke 8 months ago committed by GitHub
parent 7ad7288dca
commit df58e0a694
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 14
      .circleci/config.yml
  2. 4
      plugins/resources/nomiclabs.utils.js
  3. 3
      scripts/nomiclabs.sh

@ -15,6 +15,19 @@ step_install_nvm: &step_install_nvm
nvm install v18 nvm install v18
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $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: jobs:
unit-test: unit-test:
docker: docker:
@ -57,6 +70,7 @@ jobs:
steps: steps:
- checkout - checkout
- <<: *step_install_nvm - <<: *step_install_nvm
- <<: *step_install_foundry
- run: - run:
name: Hardhat E2E name: Hardhat E2E
command: | command: |

@ -36,6 +36,10 @@ function normalizeConfig(config, args={}){
? sources = path.join(config.paths.sources, args.sources) ? sources = path.join(config.paths.sources, args.sources)
: sources = config.paths.sources; : sources = config.paths.sources;
if (!path.isAbsolute(sources)) {
sources = path.join(config.paths.root, sources);
}
if (config.solidity && config.solidity.compilers.length) { if (config.solidity && config.solidity.compilers.length) {
config.viaIR = isUsingViaIR(config.solidity); config.viaIR = isUsingViaIR(config.solidity);
} }

@ -50,6 +50,9 @@ npm install --silent
npm install --save-dev --silent $PR_PATH npm install --save-dev --silent $PR_PATH
cat package.json cat package.json
npx hardhat init-foundry
cat foundry.toml
npx hardhat coverage npx hardhat coverage
verifyCoverageExists verifyCoverageExists

Loading…
Cancel
Save