-
Notifications
You must be signed in to change notification settings - Fork 9
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 #266 from lidofinance/feat/val-1135-e2e-impr
hardhat e2e for dsm v3
- Loading branch information
Showing
43 changed files
with
6,076 additions
and
4,842 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 |
---|---|---|
@@ -1,27 +1,54 @@ | ||
name: Tests and checks | ||
on: pull_request | ||
jobs: | ||
test: | ||
name: App tests | ||
unit_tests: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Set up node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
node-version: 18 | ||
cache: 'yarn' | ||
- name: Install dependencies | ||
run: yarn install --immutable | ||
- name: Run lint | ||
run: yarn lint | ||
- name: Run tests | ||
run: yarn test | ||
env: | ||
RPC_URL: ${{ secrets.RPC_URL }} | ||
CHAIN_ID: 17000 | ||
LOCATOR_DEVNET_ADDRESS: "0x28FAB2059C713A7F9D8c86Db49f9bb0e96Af1ef8" | ||
WALLET_PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }} | ||
|
||
e2e_tests: | ||
name: E2E Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Set up node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'yarn' | ||
- name: Install dependencies | ||
run: yarn install --immutable | ||
- name: Run e2e transports | ||
run: docker compose -f docker-compose.test.yml up -d | ||
- name: Pull kapi | ||
run: docker pull lidofinance/lido-keys-api:staging | ||
- name: Pull psql | ||
run: docker pull postgres:14-alpine | ||
- name: Run e2e tests | ||
run: yarn test:e2e | ||
env: | ||
RPC_URL: ${{ secrets.RPC_URL }} | ||
WALLET_PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }} | ||
KEYS_API_URL: http://127.0.0.1:3000 | ||
CHAIN_ID: 17000 | ||
LOCATOR_DEVNET_ADDRESS: "0x28FAB2059C713A7F9D8c86Db49f9bb0e96Af1ef8" | ||
|
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,31 @@ | ||
import { HardhatUserConfig } from 'hardhat/config'; | ||
import * as dotenv from 'dotenv'; | ||
dotenv.config(); | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
const RPC_URL = process.env.RPC_URL!; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
const secretKey = process.env.WALLET_PRIVATE_KEY!; | ||
const CHAIN_ID = process.env.CHAIN_ID || '17000'; | ||
|
||
const config: HardhatUserConfig = { | ||
networks: { | ||
hardhat: { | ||
forking: { | ||
url: RPC_URL, | ||
}, | ||
chainId: parseInt(CHAIN_ID, 10), | ||
accounts: [ | ||
{ | ||
privateKey: secretKey, | ||
balance: (BigInt(1e18) * BigInt(100)).toString(), | ||
}, | ||
], | ||
}, | ||
}, | ||
solidity: { | ||
version: '0.8.4', | ||
}, | ||
}; | ||
|
||
export default config; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const TEST_SERVER_PORT = 8545; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { SRModule } from '.'; | ||
import { ELBlockSnapshot } from './ELBlockSnapshot'; | ||
import { RegistryKey } from './RegistryKey'; | ||
|
||
export type SRModuleKeyListResponse = { | ||
data: { | ||
keys: Array<RegistryKey>; | ||
module: SRModule; | ||
}; | ||
meta: { | ||
elBlockSnapshot: ELBlockSnapshot; | ||
}; | ||
}; |
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
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.