mirror of
https://github.com/bitfireAT/davx5-ose
synced 2024-07-22 19:21:09 +00:00
[CI] Fix tests
This commit is contained in:
parent
e638f5debc
commit
30d4aa2e73
13
.github/workflows/test-dev.yml
vendored
13
.github/workflows/test-dev.yml
vendored
|
@ -8,6 +8,9 @@ concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
is_main_branch: ${{ github.ref == 'refs/heads/dev-ose' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: Tests without emulator
|
name: Tests without emulator
|
||||||
|
@ -21,9 +24,10 @@ jobs:
|
||||||
- uses: gradle/actions/setup-gradle@v3
|
- uses: gradle/actions/setup-gradle@v3
|
||||||
with:
|
with:
|
||||||
cache-encryption-key: ${{ secrets.gradle_encryption_key }}
|
cache-encryption-key: ${{ secrets.gradle_encryption_key }}
|
||||||
|
cache-write-only: ${{ env.is_main_branch }} # otherwise build cache will grow larger and larger
|
||||||
|
|
||||||
- name: Create app/build and gradle configuration cache
|
- name: Create app/build and gradle configuration cache
|
||||||
if: ${{ github.ref == 'refs/heads/dev-ose' }}
|
if: ${{ env.is_main_branch }}
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
key: app_build-tests-without-emulator-${{ github.run_id }}
|
key: app_build-tests-without-emulator-${{ github.run_id }}
|
||||||
|
@ -31,7 +35,7 @@ jobs:
|
||||||
.gradle/configuration-cache
|
.gradle/configuration-cache
|
||||||
app/build
|
app/build
|
||||||
- name: Use app/build and gradle configuration cache
|
- name: Use app/build and gradle configuration cache
|
||||||
if: ${{ github.ref != 'refs/heads/dev-ose' }}
|
if: ${{ env.is_main_branch }}
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
key: app_build-tests-without-emulator
|
key: app_build-tests-without-emulator
|
||||||
|
@ -55,9 +59,10 @@ jobs:
|
||||||
- uses: gradle/actions/setup-gradle@v3
|
- uses: gradle/actions/setup-gradle@v3
|
||||||
with:
|
with:
|
||||||
cache-encryption-key: ${{ secrets.gradle_encryption_key }}
|
cache-encryption-key: ${{ secrets.gradle_encryption_key }}
|
||||||
|
cache-write-only: ${{ env.is_main_branch }} # otherwise build cache will grow larger and larger
|
||||||
|
|
||||||
- name: Create app/build and gradle configuration cache
|
- name: Create app/build and gradle configuration cache
|
||||||
if: ${{ github.ref == 'refs/heads/dev-ose' }}
|
if: ${{ env.is_main_branch }}
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
key: app_build-tests-without-emulator-${{ github.run_id }}
|
key: app_build-tests-without-emulator-${{ github.run_id }}
|
||||||
|
@ -65,7 +70,7 @@ jobs:
|
||||||
.gradle/configuration-cache
|
.gradle/configuration-cache
|
||||||
app/build
|
app/build
|
||||||
- name: Use app/build and gradle configuration cache
|
- name: Use app/build and gradle configuration cache
|
||||||
if: ${{ github.ref != 'refs/heads/dev-ose' }}
|
if: ${{ env.is_main_branch }}
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
key: app_build-tests-without-emulator
|
key: app_build-tests-without-emulator
|
||||||
|
|
Loading…
Reference in a new issue