1
0
mirror of https://github.com/wulkanowy/wulkanowy.git synced 2024-11-22 16:06:56 -06:00

Github workflow config improvements (#1056)

This commit is contained in:
Mikołaj Pich 2020-12-28 22:45:21 +01:00 committed by GitHub
parent 7fe638130e
commit 5a2a0e3d6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 10 deletions

View File

@ -28,9 +28,9 @@ jobs:
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}
- name: Build
run: ./gradlew compileFdroidDebugUnitTestKotlin packageFdroidDebug preFdroidDebugAndroidTestBuild
run: ./gradlew --build-cache compileFdroidDebugUnitTestKotlin preFdroidDebugAndroidTestBuild dexBuilderFdroidDebugAndroidTest packageFdroidDebug packageFdroidDebugAndroidTest
- name: Prepare build cache
run: tar -cvf prebuild.tar .gradle app/build
run: tar -cf prebuild.tar .build-cache .gradle app/build
- uses: actions/upload-artifact@v2
with:
name: prebuild.tar
@ -56,18 +56,18 @@ jobs:
with:
name: prebuild.tar
- name: Extract build cache
run: tar -xvf prebuild.tar app/build
run: tar -xf prebuild.tar
- name: Unit tests
run: |
./gradlew -Pcoverage testFdroidDebugUnitTest --stacktrace
./gradlew -Pcoverage jacocoTestReport --stacktrace
./gradlew --build-cache -Pcoverage testFdroidDebugUnitTest --stacktrace
./gradlew --build-cache -Pcoverage jacocoTestReport --stacktrace
- uses: codecov/codecov-action@v1
with:
flags: unit
instrumentation-tests:
name: Instrumentation tests
runs-on: ubuntu-latest
runs-on: macOS-latest
timeout-minutes: 15
needs: [ build ]
strategy:
@ -89,15 +89,15 @@ jobs:
with:
name: prebuild.tar
- name: Extract build cache
run: tar -xvf prebuild.tar app/build
run: tar -xf prebuild.tar
- name: Instrumentation tests
uses: reactivecircus/android-emulator-runner@v2.13.0
with:
api-level: ${{ matrix.api-level }}
arch: x86
script: |
./gradlew -Pcoverage connectedFdroidDebugAndroidTest --stacktrace
./gradlew -Pcoverage jacocoTestReport --stacktrace
./gradlew --build-cache -Pcoverage connectedFdroidDebugAndroidTest --stacktrace
./gradlew --build-cache -Pcoverage jacocoTestReport --stacktrace
- uses: codecov/codecov-action@v1
with:
flags: instrumented,api-${{ matrix.api-level }}
@ -124,7 +124,7 @@ jobs:
with:
name: prebuild.tar
- name: Extract build cache
run: tar -xvf prebuild.tar app/build
run: tar -xf prebuild.tar
- name: Decrypt keys
env:
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}

1
.gitignore vendored
View File

@ -19,6 +19,7 @@ out/
# Gradle files
.gradle/
build/
.build-cache
# Local configuration file (sdk path, etc)
local.properties

View File

@ -1 +1,8 @@
include ':app'
buildCache {
local {
directory = new File(rootDir, '.build-cache')
removeUnusedEntriesAfterDays = 30
}
}