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

Internal #2130

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Expand Up @@ -73,8 +73,8 @@ jobs:
key: ${{ runner.os }}-${{ env.cache-version }}-bazel-test-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ env.cache-version }}-bazel-test-
- name: Run Robolectric tests
run: bazelisk test --test_tag_filters=robolectric --build_tag_filters=robolectric --test_output=all ...
- name: Run Robolectric tests and fast tagged tests
run: bazelisk test --test_tag_filters=robolectric,fast --build_tag_filters=robolectric,fast --test_output=all ...
shell: bash
- name: 'Clean bazel cache'
# Don't cache the bazel/external directory, since it can be > 2GB
Expand Down Expand Up @@ -131,4 +131,3 @@ jobs:
name: test-reports
path: gradle-tests/**/build/reports/androidTests/


12 changes: 11 additions & 1 deletion tools/release/BUILD → gradle-tests/BUILD.bazel
@@ -1,4 +1,5 @@
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
load(
"//build_extensions:axt_versions.bzl",
"ANDROIDX_JUNIT_VERSION",
Expand Down Expand Up @@ -33,13 +34,22 @@ expand_template(
"{RULES_VERSION}": RULES_VERSION,
"{RUNNER_VERSION}": RUNNER_VERSION,
"{SERVICES_VERSION}": SERVICES_VERSION,
"{MODIFY_WARNING}": "// This file is auto-generated from tools/release/validation_and_propagate_versions.sh\n// DO NOT MODIFY locally",
},
template = "settings.gradle.template",
)

genrule(
name = "update_settings_gradle_rule",
srcs = [":update_settings_gradle"],
outs = ["settings.gradle"],
outs = ["settings.gradle.generated"],
cmd = "cp $(location :update_settings_gradle) \"$@\"",
)

diff_test(
name = "settings_gradle_diff_test",
file1 = "settings.gradle",
file2 = ":settings.gradle.generated",
failure_message = "Unexpected diff detected in settings.gradle. Have you run tools/release/validate_and_propagate_versions.sh?",
tags = ["fast"],
)
3 changes: 3 additions & 0 deletions gradle-tests/settings.gradle
@@ -1,3 +1,6 @@
// This file is auto-generated from tools/release/validation_and_propagate_versions.sh
// DO NOT MODIFY locally

pluginManagement {
repositories {
gradlePluginPortal()
Expand Down
41 changes: 0 additions & 41 deletions gradle-tests/settings.gradle.previous

This file was deleted.

@@ -1,3 +1,5 @@
{MODIFY_WARNING}

pluginManagement {
repositories {
gradlePluginPortal()
Expand Down Expand Up @@ -36,7 +38,6 @@ include ':runner'
include ':espresso'
include ':espresso:accessibility'
include ':espresso:contrib'
include ':espresso-device'
include ':espresso:idling_resource'
include ':espresso:web'
include ':orchestrator'
4 changes: 2 additions & 2 deletions tools/release/validate_and_propagate_versions.sh 100644 → 100755
Expand Up @@ -17,5 +17,5 @@ OUTPUT=`bazelisk run //tools/release/java/androidx/test/tools/releaseupdater:rel
if [[ ! -z "$OUTPUT" ]]; then
echo $OUTPUT | xargs buildozer
fi
bazelisk build //tools/release:update_settings_gradle_rule
cp bazel-bin/tools/release/settings.gradle gradle-tests/settings.gradle
bazelisk build //gradle-tests:update_settings_gradle_rule
cp bazel-bin/gradle-tests/settings.gradle.generated gradle-tests/settings.gradle