Skip to content
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

chore: use node 20 in github actions #1146

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 1 addition & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ runs:
uses: pnpm/action-setup@v4
with:
version: latest
node-version: 18
- name: Install Node.js
uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 18
version: latest
- name: Install dependencies
shell: bash
run: pnpm i --frozen-lockfile
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
env:
NEXT_PUBLIC_BALANCER_API_URL: https://api-v3.balancer.fi/graphql
NEXT_PUBLIC_WALLET_CONNECT_ID: ${{ secrets.NEXT_PUBLIC_WALLET_CONNECT_ID }}
NEXT_PRIVATE_ALCHEMY_KEY: ${{ secrets.PRIVATE_ALCHEMY_KEY }}
NEXT_PRIVATE_DRPC_KEY: ${{ secrets.PRIVATE_DRPC_KEY }}

jobs:
Expand Down
6 changes: 6 additions & 0 deletions lib/modules/pool/__mocks__/getPoolMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,11 @@ export async function getPoolMock(
.then(response => response.json())
.then(result => result.data)) as GetPoolQuery

if (!getPoolQuery.pool) {
throw new Error(
`Pool not found in api ${process.env.NEXT_PUBLIC_BALANCER_API_URL} network ${chain} poolId ${poolId}`
)
}

return getPoolQuery.pool as GqlPoolElement
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@nikolovlazar/chakra-ui-prose": "^1.2.1",
"@rainbow-me/rainbowkit": "^2.1.6",
"@rainbow-me/rainbowkit": "^2.1.7",
"@sentry/nextjs": "^8.13.0",
"@studio-freight/react-lenis": "^0.0.47",
"@tanstack/react-query": "^5.56.2",
Expand Down Expand Up @@ -85,8 +85,8 @@
"use-debounce": "^10.0.0",
"use-sound": "^4.0.1",
"usehooks-ts": "^3.1.0",
"viem": "^2.21.6",
"wagmi": "^2.12.11"
"viem": "^2.21.18",
"wagmi": "^2.12.16"
},
"devDependencies": {
"@apollo/experimental-nextjs-app-support": "^0.11.3",
Expand Down
124 changes: 53 additions & 71 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions test/anvil/anvil-global-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function setup() {
for (const chain of Object.values(testChains)) {
console.log('Starting proxy ', {
port: chain.port,
forkUrl: getForkUrl(ANVIL_NETWORKS[chain.name], false),
forkUrl: getForkUrl(chain.name, false),
forkBlockNumber: ANVIL_NETWORKS[chain.name].forkBlockNumber,
})
promises.push(
Expand All @@ -17,7 +17,7 @@ export async function setup() {
host: '::',
options: {
chainId: chain.id,
forkUrl: getForkUrl(ANVIL_NETWORKS[chain.name], false),
forkUrl: getForkUrl(chain.name, false),
forkBlockNumber: ANVIL_NETWORKS[chain.name].forkBlockNumber,
noMining: false,
},
Expand Down
9 changes: 8 additions & 1 deletion test/anvil/anvil-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ export function getTestRpcSetup(networkName: NetworksWithFork) {
return { port, rpcUrl }
}

export function getForkUrl(network: NetworkSetup, verbose = false): string {
/*
* We currently use Drpc for all integration tests (Ethereum, Polygon and Sepolia networks)
* In case you want to use a different RPC, you can set something like this (i.e. ALCHEMY)
* const privateAlchemyKey = process.env['NEXT_PRIVATE_ALCHEMY_KEY']
* return `https://polygon-mainnet.g.alchemy.com/v2/${privateAlchemyKey}`
*/
export function getForkUrl(networkName: NetworksWithFork, verbose = false): string {
const network = ANVIL_NETWORKS[networkName]
const privateKey = process.env['NEXT_PRIVATE_DRPC_KEY']
const dRpcUrl = (chainName: string) =>
`https://lb.drpc.org/ogrpc?network=${chainName}&dkey=${privateKey}`
Expand Down
Loading