Defines a brute force isEqualTo
API for PersistableBundle
. PersistableBundle
has historically been very painful to test since they are lazy containers and do not implement equals. While the existing per value subjects are useful, they do not allow for generic comparison in parametrized tests which limits flexibility and results in more boilerplate in unit tests.
#2801
This file contains hidden or 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
name: Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- 'axt_**_release_branch' | |
pull_request: | |
branches: | |
- main | |
- 'axt_**_release_branch' | |
env: | |
cache-version: v2 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install Java 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
- name: 'Cache Bazel files' | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/bazel | |
key: ${{ runner.os }}-${{ env.cache-version }}-bazel-build-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.cache-version }}-bazel-build- | |
- name: Build maven artifacts | |
run: bazelisk build //:axt_m2repository | |
shell: bash | |
- name: cp to upload dir | |
run: | | |
mkdir -p ~/download | |
cp bazel-bin/axt_m2repository.zip ~/download | |
shell: bash | |
- name: 'Upload local snapshot for tests' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: local-snapshot | |
path: ~/download | |
- name: 'Clean bazel cache' | |
run: | | |
rm -rf $(bazel info repository_cache) | |
shell: bash | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install Java 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
- name: 'Cache Bazel files' | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/bazel | |
key: ${{ runner.os }}-${{ env.cache-version }}-bazel-test-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.cache-version }}-bazel-test- | |
- 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' | |
run: | | |
rm -rf $(bazel info repository_cache) | |
shell: bash | |
gradle-emulator-test: | |
runs-on: ubuntu-latest | |
needs: [build] | |
timeout-minutes: 20 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install Java 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '21' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Enable KVM group perms | |
run: | | |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
sudo udevadm control --reload-rules | |
sudo udevadm trigger --name-match=kvm | |
- name: 'Cache Gradle files' | |
uses: gradle/gradle-build-action@v3 | |
- name: 'Download local snapshot for tests' | |
uses: actions/download-artifact@v4 | |
with: | |
name: local-snapshot | |
path: ~/download | |
- name: 'Install to local maven repo' | |
run: | | |
mkdir -p ~/.m2 | |
unzip ~/download/axt_m2repository.zip -d ~/.m2/ | |
shell: bash | |
- name: 'Setup Android SDK' | |
uses: android-actions/setup-android@v3 | |
- name: 'Run gradle tests' | |
run: | | |
cd ${{ github.workspace }}/gradle-tests | |
./gradlew nexusOneDebugAndroidTest -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" --no-watch-fs --stacktrace | |
shell: bash | |
- name: 'Upload test reports' | |
if: success() || failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-reports | |
path: gradle-tests/**/build/reports/androidTests/ |