Skip to content

Commit 57f5187

Browse files
committed
refactor(e2e): remove build step from CI and improve dependency polling logic, remove explicit turbo cache dir
1 parent 58305a7 commit 57f5187

3 files changed

Lines changed: 8 additions & 12 deletions

File tree

.github/workflows/end-to-end-tests.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,5 @@ jobs:
4747
- name: Install Yarn dependencies
4848
run: yarn install
4949

50-
- name: Run build
51-
run: yarn build
52-
env:
53-
NODE_ENV: production
54-
5550
- name: Run end-to-end tests
5651
run: yarn test:e2e

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
],
1414
"scripts": {
1515
"allow-scripts": "echo 'n/a'",
16-
"build": "turbo build --cache-dir=.turbo",
17-
"build:packages": "turbo run build --cache-dir=.turbo --filter='!./packages/delegator-e2e'",
16+
"build": "turbo build",
17+
"build:packages": "turbo run build --filter='!./packages/delegator-e2e'",
1818
"changelog:update": "turbo run changelog:update --filter='!./packages/delegator-e2e'",
1919
"changelog:validate": "turbo run changelog:validate --filter='!./packages/delegator-e2e'",
2020
"clean": "turbo clean",

packages/delegator-e2e/src/await-dependencies.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const waitFor = async (name: string, url: string) => {
2424
});
2525

2626
do {
27-
if (!isAvailable) {
27+
if (isAvailable !== undefined) {
2828
// Only add a delay if it's not the first time
2929
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
3030
}
@@ -62,12 +62,13 @@ const deployEnvironment = async () => {
6262

6363
(async () => {
6464
await waitFor('Blockchain node', nodeUrl);
65+
const waitingForDependencies = Promise.all([
66+
waitFor('Bundler', bundlerUrl),
67+
waitFor('Mock paymaster', paymasterUrl),
68+
]);
6569

6670
const environment = await deployEnvironment();
6771
await writeFile('./.gator-env.json', JSON.stringify(environment, null, 2));
6872

69-
await Promise.all([
70-
waitFor('Bundler', bundlerUrl),
71-
waitFor('Mock paymaster', paymasterUrl),
72-
]);
73+
await waitingForDependencies;
7374
})();

0 commit comments

Comments
 (0)