-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
name: Validate formatting | ||
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 . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This excludes all folders that start with `.` annotation to remove folders like `.github` | ||
directories = glob(["*"], exclude_directories = 0, exclude = glob(["*", ".*"], exclude_directories = 1)) | ||
|
||
TEST_GROUPS = { | ||
name: glob([name + "/**/*"]) | ||
for name in directories | ||
} |