Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Check pre-commit hooks in CI #922

Merged
merged 4 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Pre-Commit

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pre-commit/action@v3.0.1
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ repos:
exclude: |
(?x)^(
CHANGELOG.md|
tests/testdata/|
tests/testdata/
)
2 changes: 2 additions & 0 deletions mappings.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""File mappings for packaging rules."""

load(
"//pkg:mappings.bzl",
_REMOVE_BASE_DIRECTORY = "REMOVE_BASE_DIRECTORY",
Expand Down
2 changes: 2 additions & 0 deletions pkg.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Rules for manipulation of various packaging."""

load("//pkg:deb.bzl", _pkg_deb = "pkg_deb")
load("//pkg:tar.bzl", _pkg_tar = "pkg_tar")
load("//pkg:zip.bzl", _pkg_zip = "pkg_zip")
Expand Down
1 change: 1 addition & 0 deletions pkg/pkg.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Rules for manipulation of various packaging."""

load("//pkg/private/deb:deb.bzl", _pkg_deb = "pkg_deb")
Expand Down
1 change: 1 addition & 0 deletions pkg/private/pkg_files.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ def add_from_default_info(
data_path: path to package
data_path_without_prefix: path to the package after prefix stripping
include_runfiles: Include runfiles
workspace_name: name of the main workspace
"""
if not DefaultInfo in src:
return
Expand Down
1 change: 1 addition & 0 deletions pkg/rpm.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def pkg_rpm(name, srcs = None, spec_file = None, subrpms = None, **kwargs):
name: rule name
srcs: pkg_rpm_pfg `srcs` attribute
spec_file: pkg_rpm_legacy `spec_file` attribute
subrpms: pkg_rpm_pfg `subrpms` attribute
**kwargs: arguments to either `pkg_rpm_pfg` or `pkg_rpm_legacy`,
depending on mode

Expand Down
1 change: 0 additions & 1 deletion tests/mappings/mappings_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def _pkg_files_contents_test_impl(ctx):

expected_dests = {e: None for e in ctx.attr.expected_dests}
actual_dests = target_under_test[PackageFilesInfo].dest_src_map.keys()
n_found = 0

for actual in actual_dests:
asserts.true(
Expand Down
Loading