mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-12-25 13:56:19 +08:00
Test coverage: Verify dependency caching by running offline build
This commit is contained in:
parent
c01af7a6f6
commit
75e00ee3d1
19
.github/workflows/prod.yml
vendored
19
.github/workflows/prod.yml
vendored
@ -12,7 +12,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
# Run initial Gradle builds to push initial cache entries
|
# Run initial Gradle builds to push initial cache entries
|
||||||
# These builds should start fresh without cache hits, due to the seed injected into the cache key above.
|
# These builds should start fresh without cache hits, due to the seed injected into the cache key above.
|
||||||
basic-build:
|
seed-build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
@ -35,7 +35,7 @@ jobs:
|
|||||||
# Each build verifies that it is executed with the expected Gradle version.
|
# Each build verifies that it is executed with the expected Gradle version.
|
||||||
# These builds will not store cache entries for gradle-user-home or project-dot-gradle
|
# These builds will not store cache entries for gradle-user-home or project-dot-gradle
|
||||||
gradle-execution:
|
gradle-execution:
|
||||||
needs: basic-build
|
needs: seed-build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
@ -71,8 +71,9 @@ jobs:
|
|||||||
gradle-user-home-cache-enabled: read-only
|
gradle-user-home-cache-enabled: read-only
|
||||||
project-dot-gradle-cache-enabled: read-only
|
project-dot-gradle-cache-enabled: read-only
|
||||||
|
|
||||||
|
# Test that the gradle-user-home cache will cache dependencies, by running build with --offline
|
||||||
dependencies-cache:
|
dependencies-cache:
|
||||||
needs: basic-build
|
needs: seed-build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
@ -80,14 +81,16 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Test dependencies-cache-enabled
|
- name: Execute Gradle build with --offline
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
build-root-directory: __tests__/samples/basic
|
build-root-directory: __tests__/samples/basic
|
||||||
arguments: test
|
arguments: test --offline
|
||||||
|
gradle-user-home-cache-enabled: read-only
|
||||||
|
project-dot-gradle-cache-enabled: read-only
|
||||||
|
|
||||||
configuration-cache:
|
configuration-cache:
|
||||||
needs: basic-build
|
needs: seed-build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
@ -102,7 +105,7 @@ jobs:
|
|||||||
arguments: test --configuration-cache
|
arguments: test --configuration-cache
|
||||||
|
|
||||||
read-only-cache:
|
read-only-cache:
|
||||||
needs: basic-build
|
needs: seed-build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
@ -131,7 +134,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
failures: # These build invocations are informational only, and are expected to fail
|
failures: # These build invocations are informational only, and are expected to fail
|
||||||
needs: basic-build
|
needs: seed-build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
|
Loading…
x
Reference in New Issue
Block a user