-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1440 from morpho-dao/test/add-ci-prod-tests
Add production tests to CI
- Loading branch information
Showing
24 changed files
with
1,302 additions
and
1,700 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Foundry upgrade tests | ||
description: Runs full forge test suite given a protocol and a network | ||
|
||
inputs: | ||
protocol: | ||
description: The protocol against which to run the forge test suite. | ||
required: true | ||
network: | ||
description: The network against which to run the forge test suite. | ||
required: true | ||
alchemyKey: | ||
description: The Alchemy key giving access to a private RPC. | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
shell: bash | ||
|
||
- name: Install Foundry | ||
uses: onbjerg/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Foundry fork cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.foundry/cache | ||
key: foundry-${{ hashFiles('Makefile', 'foundry.toml') }} # where fork block numbers & RPC are stored | ||
|
||
- name: Foundry compilation cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
cache | ||
out | ||
key: ${{ github.base_ref || github.ref_name }}-foundry-${{ inputs.protocol }}-${{ inputs.network }} # always keep compiled contracts from base branch | ||
|
||
- name: Run upgrade tests | ||
run: make ci-upgrade | ||
shell: bash | ||
env: | ||
PROTOCOL: ${{ inputs.protocol }} | ||
NETWORK: ${{ inputs.network }} | ||
ALCHEMY_KEY: ${{ inputs.alchemyKey }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Foundry upgrade tests (Morpho-Aave V2) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
# branches: | ||
# - main # disabled for testing | ||
paths: | ||
- "lib/**" | ||
- "config/**/aave-v2/**" | ||
- "contracts/common/**" | ||
- "contracts/aave-v2/**" | ||
- "test-foundry/common/**" | ||
- "test-foundry/aave-v2/**" | ||
- "*.lock" | ||
- "Makefile" | ||
- "foundry.toml" | ||
- "remappings.txt" | ||
- ".github/actions/ci-foundry-upgrade/*" | ||
- ".github/workflows/ci-foundry-aave-v2-upgrade.yml" | ||
|
||
jobs: | ||
morpho-aave-v2-eth-mainnet-upgrade: | ||
name: eth-mainnet | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: ./.github/actions/ci-foundry-upgrade | ||
with: | ||
protocol: aave-v2 | ||
network: eth-mainnet | ||
alchemyKey: ${{ secrets.ALCHEMY_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Foundry upgrade tests (Morpho-Compound) | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
# branches: | ||
# - main # disabled for testing | ||
paths: | ||
- "lib/**" | ||
- "config/**/compound/**" | ||
- "contracts/common/**" | ||
- "contracts/compound/**" | ||
- "test-foundry/common/**" | ||
- "test-foundry/compound/**" | ||
- "*.lock" | ||
- "Makefile" | ||
- "foundry.toml" | ||
- "remappings.txt" | ||
- ".github/actions/ci-foundry-upgrade/*" | ||
- ".github/workflows/ci-foundry-compound-upgrade.yml" | ||
|
||
jobs: | ||
morpho-compound-eth-mainnet-upgrade: | ||
name: eth-mainnet | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: ./.github/actions/ci-foundry-upgrade | ||
with: | ||
protocol: compound | ||
network: eth-mainnet | ||
alchemyKey: ${{ secrets.ALCHEMY_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.