Skip to content

Commit

Permalink
add a test in e2e so we get a green CI
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Mar 9, 2024
1 parent 5647373 commit 0516fca
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 60 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,17 @@ on:
workflow_dispatch:

concurrency:
# Cancel previous actions from the same PR or branch except 'main' branch.
# See https://docs.github.com/en/actions/using-jobs/using-concurrency and https://docs.github.com/en/actions/learn-github-actions/contexts for more info.
group: concurrency-group::${{ github.workflow }}::${{ github.event.pull_request.number > 0 && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}${{ github.ref_name == 'main' && format('::{0}', github.run_id) || ''}}
cancel-in-progress: ${{ github.ref_name != 'main' }}
# Cancel previous actions from the same PR or branch except 'main' branch.
# See https://docs.github.com/en/actions/using-jobs/using-concurrency and https://docs.github.com/en/actions/learn-github-actions/contexts for more info.
group: concurrency-group::${{ github.workflow }}::${{ github.event.pull_request.number > 0 && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}${{ github.ref_name == 'main' && format('::{0}', github.run_id) || ''}}
cancel-in-progress: ${{ github.ref_name != 'main' }}

jobs:
test:
uses: bazel-contrib/.github/.github/workflows/bazel.yaml@v6
with:
folders: |
[
".",
"e2e/smoke"
]
folders: '["e2e/smoke"]'
exclude: |
[
{"folder": ".", "bzlmodEnabled": false}
{"bazelversion": "6.4.0"}
]
6 changes: 6 additions & 0 deletions e2e/smoke/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ proto_library(
name = "foo_proto",
srcs = ["foo.proto"],
)

sh_test(
name = "test",
srcs = ["test.sh"],
data = ["foo_proto"],
)
3 changes: 3 additions & 0 deletions e2e/smoke/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

grep msg $TEST_SRCDIR/_main/foo_proto-descriptor-set.proto.bin
18 changes: 0 additions & 18 deletions protoc/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//protoc/private:resolved_toolchain.bzl", "resolved_toolchain")

# For stardoc to reference the files
exports_files(["defs.bzl"])

resolved_toolchain(
name = "resolved_toolchain",
# Marked manual so that `bazel test //...` passes
# even if no toolchain is registered.
tags = ["manual"],
visibility = ["//visibility:public"],
)

bzl_library(
name = "repositories",
Expand All @@ -23,12 +11,6 @@ bzl_library(
],
)

bzl_library(
name = "defs",
srcs = ["defs.bzl"],
visibility = ["//visibility:public"],
)

bzl_library(
name = "extensions",
srcs = ["extensions.bzl"],
Expand Down
5 changes: 0 additions & 5 deletions protoc/defs.bzl

This file was deleted.

27 changes: 0 additions & 27 deletions protoc/private/resolved_toolchain.bzl

This file was deleted.

0 comments on commit 0516fca

Please sign in to comment.