Skip to content

Commit

Permalink
ci: configure bazel to ignore vite tests when using non esbuild tests
Browse files Browse the repository at this point in the history
This commit configures bazel to skip adding vite tests to the webpack tests shards.

(cherry picked from commit 5ec624e)
  • Loading branch information
alan-agius4 authored and clydin committed Nov 13, 2023
1 parent 4c25164 commit e1d6ee2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 6 additions & 2 deletions tests/legacy-cli/e2e.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ ESBUILD_TESTS = [
"tests/test/**",
]

WEBPACK_IGNORE_TESTS = [
"tests/vite/**",
]

def _to_glob(patterns):
if len(patterns) == 1:
return patterns[0]
Expand Down Expand Up @@ -126,7 +130,7 @@ def _e2e_suite(name, runner, type, data, toolchain_name = "", toolchain = None):
if type == "yarn":
args.append("--yarn")
tests = YARN_TESTS
ignore = BROWSER_TESTS
ignore = BROWSER_TESTS + WEBPACK_IGNORE_TESTS
elif type == "esbuild":
args.append("--esbuild")
tests = ESBUILD_TESTS
Expand All @@ -137,7 +141,7 @@ def _e2e_suite(name, runner, type, data, toolchain_name = "", toolchain = None):
ignore = None
elif type == "npm":
tests = None
ignore = BROWSER_TESTS
ignore = BROWSER_TESTS + WEBPACK_IGNORE_TESTS

# Standard e2e tests
_e2e_tests(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@ import { setTimeout } from 'node:timers/promises';
import assert from 'node:assert';
import { findFreePort } from '../../utils/network';
import { execAndWaitForOutputToMatch, killAllProcesses, ng } from '../../utils/process';
import { getGlobalVariable } from '../../utils/env';

export default async function () {
const useWebpackBuilder = !getGlobalVariable('argv')['esbuild'];
if (useWebpackBuilder) {
return;
}

await ng('cache', 'clean');
await ng('cache', 'on');

Expand Down

0 comments on commit e1d6ee2

Please sign in to comment.