Skip to content

🐦 Test hardhat-waffle-plugin submodule #810

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

Merged
merged 25 commits into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from 9 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
43 changes: 43 additions & 0 deletions .github/workflows/CI-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Plugin CI
on:
pull_request:
push:
branches:
- master
jobs:
test-waffle-hardhat-plugin:
runs-on: ubuntu-latest
strategy:
matrix:
hardhat: ['2.9.2', '2.11.2', 'latest']
hardhat-ethers: ['2.0.3', '2.1.1', 'latest']
hardhat-waffle: ['linked', 'latest'] # TODO: add dev (remember it's a different package)
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
- run: npm i -g [email protected] [email protected]
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
- run: pnpm add -D hardhat@${{ matrix.hardhat }}
working-directory: waffle-hardhat
- run: pnpm add -D @nomiclabs/hardhat-ethers@${{ matrix.hardhat-ethers }}
working-directory: waffle-hardhat
- run: pnpm add -D @nomiclabs/hardhat-waffle@${{ matrix.hardhat-waffle }}
if: ${{ matrix.hardhat-waffle != 'linked' }}
working-directory: waffle-hardhat
- name: Initialize plugin submodule
if: ${{ matrix.hardhat-waffle == 'linked' }}
run: |
git submodule update --init
cd hardhat-waffle-plugin
yarn && yarn build
- name: Use the submodule in our tests
if: ${{ matrix.hardhat-waffle == 'linked' }}
run: |
rm -rf waffle-hardhat/node_modules/@nomiclabs/hardhat-waffle/dist
cp -r hardhat-waffle-plugin/dist waffle-hardhat/node_modules/@nomiclabs/hardhat-waffle
- run: pnpm run build
- run: pnpm run test
working-directory: waffle-hardhat
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "hardhat-waffle-plugin"]
path = hardhat-waffle-plugin
url = https://github.com/NomicFoundation/hardhat-waffle
1 change: 1 addition & 0 deletions hardhat-waffle-plugin
Submodule hardhat-waffle-plugin added at a32d32
2 changes: 2 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions waffle-hardhat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@
},
"devDependencies": {
"@ethereum-waffle/chai": "workspace:*",
"@ethereum-waffle/provider": "workspace:*",
"@nomiclabs/hardhat-ethers": "2.1.0",
"@nomiclabs/hardhat-waffle": "2.0.3",
"@types/node": "^17.0.41",
"eslint": "^7.14.0",
"ethereum-waffle": "workspace:*",
"mocha": "^8.2.1",
"ethers": "5.6.2",
"hardhat": "2.10.1"
"hardhat": "2.10.1",
"mocha": "^8.2.1"
}
}