Skip to content

Commit

Permalink
build: make ethers a peer dep in all contract packages
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulRBerg committed Aug 10, 2021
1 parent 9c5116d commit 0065a58
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 16 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: "Continuous Integration"

env:
COVERAGE_GIT_BRANCH: "main"
COVERAGE_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERAGE_SERVICE_NAME: "github-actions-ci"
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
Expand All @@ -20,12 +19,15 @@ jobs:
diff:
runs-on: ubuntu-latest
outputs:
amm: ${{ steps.filter.outputs["amm"] }}
flash-swap: ${{ steps.filter.outputs["flash-swap"] }}
protocol: ${{ steps.filter.outputs["protocol"] }}
proxy-target: ${{ steps.filter.outputs["proxy-target"] }}
amm: ${{ steps.filter.outputs.amm }}
flash-swap: ${{ steps.filter.outputs.flash-swap }}
protocol: ${{ steps.filter.outputs.protocol }}
proxy-target: ${{ steps.filter.outputs.proxy-target }}
steps:
- uses: dorny/paths-filter@v2
- name: "Check out the repo"
uses: "actions/checkout@v2"
- name: "Diff the files"
uses: dorny/paths-filter@v2
id: diff
with:
base: "main"
Expand All @@ -40,6 +42,8 @@ jobs:
- "packages/proxy-target/**"
ci-amm:
needs: diff
# if: ${{ needs.diff.outputs.amm == true }}
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
Expand Down Expand Up @@ -70,11 +74,13 @@ jobs:
uses: "coverallsapp/github-action@master"
with:
flag-name: "amm"
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
path-to-lcov: "./packages/amm/coverage/lcov.info"

ci-flash-swap:
needs: diff
# if: ${{ needs.diff.outputs.flash-swap == true }}
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
Expand Down Expand Up @@ -105,11 +111,13 @@ jobs:
uses: "coverallsapp/github-action@master"
with:
flag-name: "flash-swap"
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
path-to-lcov: "./packages/flash-swap/coverage/lcov.info"

ci-protocol:
needs: diff
# if: ${{ needs.diff.outputs.protocol == true }}
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
Expand Down Expand Up @@ -140,11 +148,13 @@ jobs:
uses: "coverallsapp/github-action@master"
with:
flag-name: "protocol"
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
path-to-lcov: "./packages/protocol/coverage/lcov.info"

ci-proxy-target:
needs: diff
# if: ${{ needs.diff.outputs.proxy-target == true }}
runs-on: "ubuntu-latest"
steps:
- name: "Check out the repo"
Expand Down Expand Up @@ -178,5 +188,5 @@ jobs:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
3 changes: 2 additions & 1 deletion packages/amm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"dependencies": {
"@hifi/protocol": "1.3.0",
"@paulrberg/contracts": "3.4.0",
"ethers": "^5.4.4",
"prb-math": "2.2.0"
},
"devDependencies": {
Expand Down Expand Up @@ -44,7 +45,6 @@
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"ethereum-waffle": "^3.4.0",
"ethers": "^5.4.4",
"evm-fp": "^1.1.2",
"fs-extra": "^10.0.0",
"hardhat": "^2.6.0",
Expand Down Expand Up @@ -84,6 +84,7 @@
"peerDependencies": {
"@hifi/protocol": "1.3.0",
"@paulrberg/contracts": "3.4.0",
"ethers": "^5.4.4",
"prb-math": "2.2.0"
},
"publishConfig": {
Expand Down
7 changes: 4 additions & 3 deletions packages/flash-swap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"dependencies": {
"@hifi/protocol": "1.3.0",
"@paulrberg/contracts": "3.4.0",
"@uniswap/v2-core": "1.0.1"
"@uniswap/v2-core": "1.0.1",
"ethers": "^5.4.4"
},
"devDependencies": {
"@ethersproject/abi": "^5.4.0",
Expand All @@ -39,7 +40,6 @@
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"ethereum-waffle": "^3.4.0",
"ethers": "^5.4.4",
"evm-fp": "^1.1.2",
"from-exponential": "^1.1.1",
"fs-extra": "^10.0.0",
Expand Down Expand Up @@ -78,7 +78,8 @@
"peerDependencies": {
"@hifi/protocol": "1.3.0",
"@paulrberg/contracts": "3.4.0",
"@uniswap/v2-core": "1.0.1"
"@uniswap/v2-core": "1.0.1",
"ethers": "^5.4.4"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 2 additions & 0 deletions packages/protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"dependencies": {
"@openzeppelin/contracts-upgradeable": "4.2.0",
"@paulrberg/contracts": "3.4.0",
"ethers": "^5.4.4",
"prb-math": "2.2.0"
},
"devDependencies": {
Expand Down Expand Up @@ -84,6 +85,7 @@
"peerDependencies": {
"@openzeppelin/contracts-upgradeable": "4.2.0",
"@paulrberg/contracts": "3.4.0",
"ethers": "^5.4.4",
"prb-math": "2.2.0"
},
"publishConfig": {
Expand Down
6 changes: 4 additions & 2 deletions packages/proxy-target/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"dependencies": {
"@hifi/amm": "1.3.0",
"@hifi/protocol": "1.3.0",
"@paulrberg/contracts": "3.4.0"
"@paulrberg/contracts": "3.4.0",
"ethers": "^5.4.4"
},
"devDependencies": {
"@ethersproject/abi": "^5.4.0",
Expand Down Expand Up @@ -61,7 +62,8 @@
"peerDependencies": {
"@hifi/amm": "1.3.0",
"@hifi/protocol": "1.3.0",
"@paulrberg/contracts": "3.4.0"
"@paulrberg/contracts": "3.4.0",
"ethers": "^5.4.4"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,7 @@ __metadata:
peerDependencies:
"@hifi/protocol": 1.3.0
"@paulrberg/contracts": 3.4.0
ethers: ^5.4.4
prb-math: 2.2.0
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -1036,6 +1037,7 @@ __metadata:
"@hifi/protocol": 1.3.0
"@paulrberg/contracts": 3.4.0
"@uniswap/v2-core": 1.0.1
ethers: ^5.4.4
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -1130,6 +1132,7 @@ __metadata:
peerDependencies:
"@openzeppelin/contracts-upgradeable": 4.2.0
"@paulrberg/contracts": 3.4.0
ethers: ^5.4.4
prb-math: 2.2.0
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -1172,6 +1175,7 @@ __metadata:
"@hifi/amm": 1.3.0
"@hifi/protocol": 1.3.0
"@paulrberg/contracts": 3.4.0
ethers: ^5.4.4
languageName: unknown
linkType: soft

Expand Down

0 comments on commit 0065a58

Please sign in to comment.