Skip to content

Commit 4e290b8

Browse files
Enable bzlmod (#4)
* bcr things * add smoke test * wip * add test file * update non-bzlmod test * wip * wip * wip * wip
1 parent 9800fd8 commit 4e290b8

41 files changed

Lines changed: 2162 additions & 252 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bazelignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e2e/

.bazelrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# Take care to document any settings that you expect users to apply.
33
# Settings that apply only to CI are in .github/workflows/ci.bazelrc
44

5+
# Required until this is the default; expected in Bazel 7
6+
common --enable_bzlmod
57

68
# Load any settings specific to the current user.
79
# .bazelrc.user should appear in .gitignore so that settings are not shared with team members
@@ -10,4 +12,4 @@
1012
# See https://docs.bazel.build/versions/master/best-practices.html#bazelrc
1113
# (Note that we use .bazelrc.user so the file appears next to .bazelrc in directory listing,
1214
# rather than user.bazelrc as suggested in the Bazel docs)
13-
try-import %workspace%/.bazelrc.user
15+
try-import %workspace%/.bazelrc.user

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2.2
1+
6.3.0

.bcr/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Bazel Central Registry
2+
3+
When the ruleset is released, we want it to be published to the
4+
Bazel Central Registry automatically:
5+
<https://registry.bazel.build>
6+
7+
This folder contains configuration files to automate the publish step.
8+
See <https://github.com/bazel-contrib/publish-to-bcr/blob/main/templates/README.md>
9+
for authoritative documentation about these files.

.bcr/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# See https://github.com/bazel-contrib/publish-to-bcr#a-note-on-release-automation
2+
# for guidance about whether to uncomment this section:
3+
#
4+
# fixedReleaser:
5+
# login: my_github_handle
6+
# email: me@my.org

.bcr/metadata.template.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"homepage": "https://github.com/caseyduquettesc/rules_python_pytest",
3+
"maintainers": [
4+
{
5+
"github": "caseyduquettesc",
6+
"name": "Casey Duquette"
7+
}
8+
],
9+
"repository": ["github:caseyduquettesc/rules_python_pytest"],
10+
"versions": [],
11+
"yanked_versions": {}
12+
}

.bcr/presubmit.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
bcr_test_module:
2+
module_path: "e2e/smoke"
3+
matrix:
4+
platform: ["debian10", "macos", "ubuntu2004", "windows"]
5+
tasks:
6+
run_tests:
7+
name: "Run test module"
8+
platform: ${{ platform }}
9+
test_targets:
10+
- "//..."

.bcr/source.template.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"integrity": "**leave this alone**",
3+
"strip_prefix": "{REPO}-{VERSION}",
4+
"url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/rules_python_pytest-{TAG}.tar.gz"
5+
}

.github/workflows/BUILD.bazel

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
load("@buildifier_prebuilt//:rules.bzl", "buildifier")
2+
3+
buildifier(
4+
name = "buildifier.check",
5+
exclude_patterns = ["./.git/*"],
6+
lint_mode = "warn",
7+
mode = "diff",
8+
)

.github/workflows/buildifier.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Buildifier
2+
3+
# Controls when the action will run.
4+
on:
5+
# Triggers the workflow on push or pull request events but only for the main branch
6+
push:
7+
branches: [main]
8+
pull_request:
9+
branches: [main]
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
jobs:
14+
check:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: buildifier
19+
run: bazel run --enable_bzlmod //.github/workflows:buildifier.check

0 commit comments

Comments
 (0)