Skip to content

Commit da08a21

Browse files
committed
run container tests on CI
1 parent d9dce3c commit da08a21

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

.github/workflows/_bazel.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ jobs:
8686
# resulting in a snowballing cache size and cache download/upload times.
8787
- name: Setup Runner
8888
uses: ./.github/actions/setup-runner
89+
- name: Setup Docker on Linux
90+
if: runner.os == 'Linux'
91+
uses: docker/setup-docker-action@v4
8992
- name: Setup lld on macOS
9093
if: runner.os == 'macOS' && inputs.macos_use_lld
9194
run: |

build/ci.bazelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ test:ci-linux --test_size_filters=
8989
test:ci-macOS --test_size_filters=
9090
test:ci-windows --test_size_filters=
9191

92+
# This ensures tests tagged with "requires-container-engine" run only in CI, not locally
93+
test:ci-linux --test_tag_filters=+requires-container-engine
94+
9295
# Enable reporting whenever WPT tests are run
9396
test:ci-test --config=wpt-test
9497
common:wpt-test --test_env=GEN_TEST_REPORT=1

src/workerd/server/tests/container-client/BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ wd_test(
55
src = "test.wd-test",
66
args = ["--experimental"],
77
data = ["test.js"],
8-
tags = ["off-by-default"],
8+
tags = [
9+
"off-by-default",
10+
"requires-container-engine",
11+
],
912
)

src/workerd/server/tests/container-client/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ export const testBasics = {
223223
// Test exit code monitor functionality
224224
export const testExitCode = {
225225
async test(_ctrl, env) {
226-
const id = env.CONTAINER.idFromName('testExitCode');
227-
const stub = env.CONTAINER.get(id);
226+
const id = env.MY_CONTAINER.idFromName('testExitCode');
227+
const stub = env.MY_CONTAINER.get(id);
228228
await stub.testExitCode();
229229
},
230230
};

0 commit comments

Comments
 (0)