Fix: jest e2e tests stuck in CI (#315)

* fix: decrease machine to ubuntu 20

* fix: add high gas price in global setup txs
This commit is contained in:
Victorien Gauch
2024-11-21 13:17:06 +01:00
committed by GitHub
parent d49165d7c0
commit b72d23e567
2 changed files with 17 additions and 14 deletions

View File

@@ -71,7 +71,7 @@ jobs:
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
outputs:
tests_outcome: ${{ steps.run_e2e_tests.outcome }}
runs-on: [self-hosted, ubuntu-22.04, X64, large]
runs-on: [self-hosted, ubuntu-20.04, X64, large]
steps:
- name: Setup upterm session
if: ${{ inputs.e2e-tests-with-ssh }}
@@ -101,7 +101,7 @@ jobs:
restore-keys: |
cached-
- name: Pull all images with retry
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
max_attempts: 10
retry_on: error
@@ -121,7 +121,7 @@ jobs:
shell: bash
- name: Spin up fresh environment with geth tracing with retry
if: ${{ inputs.tracing-engine == 'geth' }}
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
max_attempts: 10
retry_on: error
@@ -133,7 +133,7 @@ jobs:
make clean-environment
- name: Spin up fresh environment with besu tracing with retry
if: ${{ inputs.tracing-engine == 'besu' }}
uses: nick-fields/retry@v2
uses: nick-fields/retry@v3
with:
max_attempts: 10
retry_on: error

View File

@@ -1,4 +1,5 @@
/* eslint-disable no-var */
import { ethers } from "ethers";
import { config } from "../tests-config";
import { deployContract } from "../../common/deployments";
import { DummyContract__factory, TestContract__factory } from "../../typechain";
@@ -9,7 +10,6 @@ declare global {
}
export default async (): Promise<void> => {
const l1JsonRpcProvider = config.getL1Provider();
const l1AccountManager = config.getL1AccountManager();
const l2AccountManager = config.getL2AccountManager();
@@ -22,11 +22,7 @@ export default async (): Promise<void> => {
const l1SecurityCouncil = l1AccountManager.whaleAccount(3);
const l2SecurityCouncil = l2AccountManager.whaleAccount(3);
const [l1AccountNonce, l2AccountNonce, { maxPriorityFeePerGas, maxFeePerGas }] = await Promise.all([
account.getNonce(),
l2Account.getNonce(),
l1JsonRpcProvider.getFeeData(),
]);
const [l1AccountNonce, l2AccountNonce] = await Promise.all([account.getNonce(), l2Account.getNonce()]);
const fee = etherToWei("3");
const to = "0x8D97689C9818892B700e27F316cc3E41e17fBeb9";
@@ -40,13 +36,20 @@ export default async (): Promise<void> => {
(
await lineaRollup.sendMessage(to, fee, calldata, {
value: etherToWei("500"),
maxPriorityFeePerGas,
maxFeePerGas,
gasPrice: ethers.parseUnits("300", "gwei"),
nonce: l1AccountNonce + 1,
})
).wait(),
(await l1TokenBridge.connect(l1SecurityCouncil).setRemoteTokenBridge(await l2TokenBridge.getAddress())).wait(),
(await l2TokenBridge.connect(l2SecurityCouncil).setRemoteTokenBridge(await l1TokenBridge.getAddress())).wait(),
(
await l1TokenBridge.connect(l1SecurityCouncil).setRemoteTokenBridge(await l2TokenBridge.getAddress(), {
gasPrice: ethers.parseUnits("300", "gwei"),
})
).wait(),
(
await l2TokenBridge.connect(l2SecurityCouncil).setRemoteTokenBridge(await l1TokenBridge.getAddress(), {
gasPrice: ethers.parseUnits("300", "gwei"),
})
).wait(),
]);
console.log(`L1 Dummy contract deployed at address: ${await dummyContract.getAddress()}`);