Skip to content

Commit

Permalink
add bazel config file
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Sep 11, 2024
1 parent 6188942 commit f70111e
Show file tree
Hide file tree
Showing 3 changed files with 599 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Bazel files check

permissions: read-all

on:
push:
branches:
- master
paths:
- '*.bazel'
- '*.bzl'
pull_request:
paths:
- '*.bazel'
- '*.bzl'

jobs:
check-formatting:
name: Check bazel files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup buildifier
uses: jbajic/setup-buildifier@v1
with:
buildifier-version: '7.3.1'

- name: Run buildifier
run: |
buildifier -mode check -r .
16 changes: 16 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Bazel support is added to enable projects that use Bazel to easily
# access the test suite, and file groups without having the need to float
# a patch on top of WPT.
#
# In order to iterate over the files inside a subfolder of WPT, we expose
# the globs in the `tests.bzl` file.
#
# In order to format and lint a bazel file, you can use the following command:
# > buildifier -mode=check BUILD.bazel tests.bzl
load("//:tests.bzl", "directories")

[filegroup(
name = dir,
srcs = glob(["{}/**/*".format(dir)]),
visibility = ["//visibility:public"],
) for dir in directories]
Loading

0 comments on commit f70111e

Please sign in to comment.