mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2024-11-22 20:46:18 -06:00
Github workflow config improvements (#1056)
This commit is contained in:
parent
7fe638130e
commit
5a2a0e3d6d
20
.github/workflows/test.yml
vendored
20
.github/workflows/test.yml
vendored
@ -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
1
.gitignore
vendored
@ -19,6 +19,7 @@ out/
|
||||
# Gradle files
|
||||
.gradle/
|
||||
build/
|
||||
.build-cache
|
||||
|
||||
# Local configuration file (sdk path, etc)
|
||||
local.properties
|
||||
|
@ -1 +1,8 @@
|
||||
include ':app'
|
||||
|
||||
buildCache {
|
||||
local {
|
||||
directory = new File(rootDir, '.build-cache')
|
||||
removeUnusedEntriesAfterDays = 30
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user