-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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
1 parent
e7d267c
commit 17f7410
Showing
32 changed files
with
339 additions
and
367 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
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 |
---|---|---|
@@ -1,78 +1,60 @@ | ||
name: blueprints | ||
name: build_test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- views | ||
pull_request: | ||
branches: | ||
- main | ||
- views | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest # Needed for emulators | ||
timeout-minutes: 45 | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
strategy: | ||
matrix: | ||
api-level: [29] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- uses: actions/checkout@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 | ||
ls /dev/kvm | ||
- name: Copy CI gradle.properties | ||
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | ||
|
||
- name: Set up JDK 11 | ||
- name: Set Up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 11 | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.gradle/caches/modules-* | ||
~/.gradle/caches/jars-* | ||
~/.gradle/caches/build-cache-* | ||
key: gradle-${{ hashFiles('checksum.txt') }} | ||
|
||
- name: Build project and UnitTest | ||
run: ./gradlew assembleDebug compileDebugUnitTestKotlin | ||
|
||
- name: Spotless | ||
# Spotless is not gradle configuration cache compliant. To allow the rest of the build | ||
# comply, run spotless with a gradle init script and disable the cache. | ||
run: ./gradlew spotlessCheck --init-script gradle/init.gradle.kts --no-configuration-cache | ||
distribution: 'zulu' # See 'Supported distributions' for available options | ||
java-version: '17' | ||
cache: 'gradle' | ||
|
||
- name: Unit tests | ||
run: ./gradlew testDebugUnitTest | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
# Needed to accept licenses | ||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v3 | ||
|
||
- name: Compile AndroidTests | ||
run: ./gradlew compileDebugAndroidTestKotlin | ||
|
||
- name: Run instrumentation tests | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 31 | ||
arch: x86_64 | ||
api-level: ${{ matrix.api-level }} | ||
arch: x86 | ||
disable-animations: true | ||
disk-size: 2000M | ||
heap-size: 600M | ||
script: ./gradlew connectedDebugAndroidTest | ||
script: ./gradlew connectedCheck --stacktrace | ||
|
||
- name: Upload build reports | ||
- name: Upload test reports | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build-reports | ||
path: app/build/reports/ | ||
name: test-reports-${{ matrix.api-level }} | ||
path: ./app/build/reports/androidTests | ||
|
||
|
||
- name: Upload all outputs | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: outputs | ||
path: app/build/outputs/ |
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
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
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
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
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
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
Oops, something went wrong.