From bcaf4de5bb0d8111a3a8b7df25f7d9903892b4a7 Mon Sep 17 00:00:00 2001 From: Kris Foster Date: Tue, 14 Jan 2025 10:58:39 +0000 Subject: [PATCH 1/2] tweak tests for bcr --- .github/workflows/presubmit.yml | 16 ++++++++++++++++ README.md | 2 +- examples/external-image-test/docker-compose.yml | 2 +- .../docker-compose.yml | 4 ++-- .../src/test/resources/.gitignore | 4 ---- .../src/test/resources/setup_test.sh | 4 ++-- 6 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/presubmit.yml delete mode 100644 examples/pre-compose-up-script-test/src/test/resources/.gitignore diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml new file mode 100644 index 0000000..fe6e2cd --- /dev/null +++ b/.github/workflows/presubmit.yml @@ -0,0 +1,16 @@ +bcr_test_module: + module_path: "examples" + matrix: + bazel: ["7.x", "8.x"] + platform: + - debian10 + - ubuntu2004 + - macos + - macos_arm64 + tasks: + test: + name: "Run test module" + bazel: ${{ bazel }} + platform: ${{ platform }} + test_targets: + - "//..." diff --git a/README.md b/README.md index 04a9594..7cd0c36 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ docker_compose_test( ```yaml services: test_container: - image: gcr.io/distroless/static-debian12:debug + image: ubuntu:25.04 entrypoint: ["echo", "Hello World!"] ``` diff --git a/examples/external-image-test/docker-compose.yml b/examples/external-image-test/docker-compose.yml index 474610c..8d3bd2e 100644 --- a/examples/external-image-test/docker-compose.yml +++ b/examples/external-image-test/docker-compose.yml @@ -15,7 +15,7 @@ services: test_container: - image: gcr.io/distroless/static-debian12:debug + image: ubuntu:25.04 entrypoint: ["cat", "/resources/hello.txt"] volumes: - ./src/test/resources:/resources diff --git a/examples/pre-compose-up-script-test/docker-compose.yml b/examples/pre-compose-up-script-test/docker-compose.yml index 92985ee..7d4d511 100644 --- a/examples/pre-compose-up-script-test/docker-compose.yml +++ b/examples/pre-compose-up-script-test/docker-compose.yml @@ -15,7 +15,7 @@ services: test_container: - image: gcr.io/distroless/static-debian12:debug + image: ubuntu:25.04 entrypoint: ["cat", "/resources/generated_file.txt"] volumes: - - ./src/test/resources:/resources + - /tmp/foo:/resources diff --git a/examples/pre-compose-up-script-test/src/test/resources/.gitignore b/examples/pre-compose-up-script-test/src/test/resources/.gitignore deleted file mode 100644 index e00b0dc..0000000 --- a/examples/pre-compose-up-script-test/src/test/resources/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# we don't want to check-in the generated file -# because that's what we're actually testing here -# (that the file is generated when the test is executed). -generated_file.txt diff --git a/examples/pre-compose-up-script-test/src/test/resources/setup_test.sh b/examples/pre-compose-up-script-test/src/test/resources/setup_test.sh index b8abcf6..f20e612 100755 --- a/examples/pre-compose-up-script-test/src/test/resources/setup_test.sh +++ b/examples/pre-compose-up-script-test/src/test/resources/setup_test.sh @@ -2,6 +2,6 @@ set -e # This file is created as a pre-req to the docker-compose test actually running. -# Locally, the file will always be there but it won't be checked in as it is in .gitignore. # CI will make sure that the file is generated on every execution. -touch generated_file.txt +mkdir -p /tmp/foo +touch /tmp/foo/generated_file.txt From 62d2de952cc603e725014e8dd76ce3d2fe6d4ca4 Mon Sep 17 00:00:00 2001 From: Kris Foster Date: Tue, 14 Jan 2025 10:59:31 +0000 Subject: [PATCH 2/2] rm presubmit --- .github/workflows/presubmit.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .github/workflows/presubmit.yml diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml deleted file mode 100644 index fe6e2cd..0000000 --- a/.github/workflows/presubmit.yml +++ /dev/null @@ -1,16 +0,0 @@ -bcr_test_module: - module_path: "examples" - matrix: - bazel: ["7.x", "8.x"] - platform: - - debian10 - - ubuntu2004 - - macos - - macos_arm64 - tasks: - test: - name: "Run test module" - bazel: ${{ bazel }} - platform: ${{ platform }} - test_targets: - - "//..."