Skip to content

Commit 11479d5

Browse files
committed
fix: add Docker registry service for OCI tests and make platform-aware
- Add Docker registry service (registry:2) on port 5001 for Linux CI runners - Include health checks to ensure registry is ready before tests - Conditionally exclude simple_oci_test on macOS where Docker services aren't available - This enables proper testing of OCI functionality on Linux while maintaining macOS compatibility
1 parent 291e88f commit 11479d5

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ jobs:
4444
matrix:
4545
os: [ubuntu-latest, macos-latest]
4646

47+
services:
48+
registry:
49+
image: registry:2
50+
ports:
51+
- 5001:5000
52+
options: >-
53+
--health-cmd "wget --no-verbose --tries=1 --spider http://localhost:5000/v2/ || exit 1"
54+
--health-interval 10s
55+
--health-timeout 5s
56+
--health-retries 5
57+
4758
steps:
4859
- uses: actions/checkout@v4
4960
with:
@@ -83,6 +94,13 @@ jobs:
8394
- name: Build All Targets
8495
run: |
8596
# Build core working targets, exclude incomplete/problematic examples
97+
# Additional exclusions for macOS where Docker services aren't available
98+
if [[ "$RUNNER_OS" == "macOS" ]]; then
99+
EXTRA_EXCLUDES="-//examples/simple_oci_test/..."
100+
else
101+
EXTRA_EXCLUDES=""
102+
fi
103+
86104
bazel build -- //... \
87105
-//examples/world_export/... \
88106
-//examples/multi_profile/... \
@@ -92,12 +110,12 @@ jobs:
92110
-//examples/wac_remote_compose/... \
93111
-//examples/wac_oci_composition/... \
94112
-//examples/wkg_integration/... \
95-
-//examples/simple_oci_test/... \
96113
-//examples/wizer_example/... \
97114
-//test_wac/... \
98115
-//test/wkg/... \
99116
-//test/production/... \
100117
-//tools-builder/... \
118+
$EXTRA_EXCLUDES \
101119
-//examples/basic:hello_component_wasm_lib_release \
102120
-//test/export_macro:test_component_wasm_lib_release \
103121
-//test/integration:basic_component_wasm_lib_debug \

0 commit comments

Comments
 (0)