mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-11-22 17:12:51 +00:00
Improve prod workflow
- Use a separate job to test read-only cache - Use dependency jobs to avoid cache race conditions
This commit is contained in:
parent
e7422f245c
commit
a148b21183
1 changed files with 35 additions and 12 deletions
47
.github/workflows/prod.yml
vendored
47
.github/workflows/prod.yml
vendored
|
@ -7,7 +7,22 @@ on:
|
|||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
basic-build:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
- name: Build using Gradle wrapper
|
||||
uses: ./
|
||||
with:
|
||||
build-root-directory: __tests__/samples/basic
|
||||
arguments: test
|
||||
|
||||
gradle-execution:
|
||||
needs: basic-build
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
|
@ -18,11 +33,6 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
- name: Test use Gradle wrapper
|
||||
uses: ./
|
||||
with:
|
||||
build-root-directory: __tests__/samples/basic
|
||||
arguments: test
|
||||
- name: Test use defined Gradle version
|
||||
uses: ./
|
||||
with:
|
||||
|
@ -49,6 +59,7 @@ jobs:
|
|||
arguments: help
|
||||
|
||||
dependencies-cache:
|
||||
needs: basic-build
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
|
@ -62,15 +73,9 @@ jobs:
|
|||
build-root-directory: __tests__/samples/basic
|
||||
arguments: test --no-daemon
|
||||
dependencies-cache-enabled: true
|
||||
- name: Test dependencies-cache-enabled
|
||||
uses: ./
|
||||
with:
|
||||
build-root-directory: __tests__/samples/basic
|
||||
arguments: test --no-daemon
|
||||
dependencies-cache-enabled: true
|
||||
cache-read-only: true
|
||||
|
||||
configuration-cache:
|
||||
needs: basic-build
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
|
@ -87,8 +92,26 @@ jobs:
|
|||
dependencies-cache-enabled: true
|
||||
# Configuration cache requires dependencies cache, since it assumes dependencies are already downloaded.
|
||||
|
||||
cache-read-only:
|
||||
needs: basic-build
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
- name: Test cache-read-only
|
||||
uses: ./
|
||||
with:
|
||||
build-root-directory: __tests__/samples/basic
|
||||
arguments: test --no-daemon
|
||||
dependencies-cache-enabled: true
|
||||
configuration-cache-enabled: true
|
||||
cache-read-only: true
|
||||
|
||||
failures: # These build invocations are informational only, and are expected to fail
|
||||
needs: basic-build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
|
|
Loading…
Reference in a new issue