File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # *******************************************************************************
2+ # Copyright (c) 2025 Contributors to the Eclipse Foundation
3+ #
4+ # See the NOTICE file(s) distributed with this work for additional
5+ # information regarding copyright ownership.
6+ #
7+ # This program and the accompanying materials are made available under the
8+ # terms of the Apache License Version 2.0 which is available at
9+ # https://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # SPDX-License-Identifier: Apache-2.0
12+ # *******************************************************************************
13+ name : Bzlmod Lockfile Check
14+ permissions :
15+ contents : read
16+ on :
17+ pull_request :
18+ types : [opened, reopened, synchronize]
19+ merge_group :
20+ types : [checks_requested]
21+ push :
22+ branches :
23+ - main
24+ jobs :
25+ bzlmod-lock :
26+ uses : eclipse-score/cicd-workflows/.github/workflows/bzlmod-lock-check.yml@main
27+ with :
28+ working-directory : .
Original file line number Diff line number Diff line change @@ -36,10 +36,10 @@ jobs:
3636 run : bazel mod tidy
3737
3838 - name : Build all workspace targets
39- run : bazel build --config=x86_64-linux //...
39+ run : bazel build --lockfile_mode=error -- config=x86_64-linux //...
4040
4141 - name : Run all workspace tests
42- run : bazel test --config=x86_64-linux //...
42+ run : bazel test --lockfile_mode=error -- config=x86_64-linux //...
4343
4444 - name : Lint rust code (with clippy)
45- run : bazel build --config=lint-rust //...
45+ run : bazel build --lockfile_mode=error -- config=lint-rust //...
Original file line number Diff line number Diff line change 2121 copyright-check :
2222 uses : eclipse-score/cicd-workflows/.github/workflows/copyright.yml@c1c90b1a82a1fab0fc202979dde6686b2162d5a8 # v0.0.0
2323 with :
24- bazel-target : " run //:copyright.check"
24+ bazel-target : " run --lockfile_mode=error //:copyright.check"
Original file line number Diff line number Diff line change 3939
4040 with :
4141 # the bazel-target depends on your repo specific docs_targets configuration (e.g. "suffix")
42- bazel-target : " //:docs -- --github_user=${{ github.repository_owner }} --github_repo=${{ github.event.repository.name }}"
42+ bazel-target : " --lockfile_mode=error //:docs -- --github_user=${{ github.repository_owner }} --github_repo=${{ github.event.repository.name }}"
4343 retention-days : 3
Original file line number Diff line number Diff line change 2323 formatting-check :
2424 uses : eclipse-score/cicd-workflows/.github/workflows/format.yml@c1c90b1a82a1fab0fc202979dde6686b2162d5a8 # v0.0.0
2525 with :
26- bazel-target : " test //:format.check" # optional, this is the default
26+ bazel-target : " test --lockfile_mode=error //:format.check" # optional, this is the default
Original file line number Diff line number Diff line change @@ -60,18 +60,18 @@ jobs:
6060
6161 - name : Build via Bazel
6262 run : |
63- echo "Running: bazel build //..."
64- bazel build //...
63+ echo "Running: bazel build --lockfile_mode=error //..."
64+ bazel build --lockfile_mode=error //...
6565
6666 - name : Run Unit Tests via Bazel
6767 run : |
68- echo "Running: bazel test //:unit_tests"
69- bazel test //:unit_tests
68+ echo "Running: bazel test --lockfile_mode=error //:unit_tests"
69+ bazel test --lockfile_mode=error //:unit_tests
7070
7171 - name : Run Unit Test with Coverage for Rust
7272 run : |
7373 # Run tests
74- bazel coverage //:unit_tests \
74+ bazel coverage --lockfile_mode=error //:unit_tests \
7575 --collect_code_coverage \
7676 --combined_report=lcov \
7777 --experimental_generate_llvm_lcov \
Original file line number Diff line number Diff line change 3434
3535# Bazel
3636bazel- *
37- MODULE.bazel.lock
3837user.bazelrc
3938
4039# Ruff
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
1919
2020buildifier -r $SCRIPT_DIR
2121bazelisk mod tidy
22- bazelisk run //:format.fix
23- bazelisk run //:format.check_Rust_with_rustfmt
24- bazelisk run //:copyright.check
25- bazelisk build --config=lint-rust //...
26- bazelisk build --config=x86_64-linux //...
27- bazelisk test --config=x86_64-linux //...
22+ bazelisk run --lockfile_mode=error //:format.fix
23+ bazelisk run --lockfile_mode=error //:format.check_Rust_with_rustfmt
24+ bazelisk run --lockfile_mode=error //:copyright.check
25+ bazelisk build --lockfile_mode=error -- config=lint-rust //...
26+ bazelisk build --lockfile_mode=error -- config=x86_64-linux //...
27+ bazelisk test --lockfile_mode=error -- config=x86_64-linux //...
You can’t perform that action at this time.
0 commit comments