mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-12-26 00:32:08 -05: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:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
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:
|
gradle-execution:
|
||||||
|
needs: basic-build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
@ -18,11 +33,6 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
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
|
- name: Test use defined Gradle version
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
@ -49,6 +59,7 @@ jobs:
|
||||||
arguments: help
|
arguments: help
|
||||||
|
|
||||||
dependencies-cache:
|
dependencies-cache:
|
||||||
|
needs: basic-build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
@ -62,15 +73,9 @@ jobs:
|
||||||
build-root-directory: __tests__/samples/basic
|
build-root-directory: __tests__/samples/basic
|
||||||
arguments: test --no-daemon
|
arguments: test --no-daemon
|
||||||
dependencies-cache-enabled: true
|
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:
|
configuration-cache:
|
||||||
|
needs: basic-build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
@ -87,8 +92,26 @@ jobs:
|
||||||
dependencies-cache-enabled: true
|
dependencies-cache-enabled: true
|
||||||
# Configuration cache requires dependencies cache, since it assumes dependencies are already downloaded.
|
# 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
|
failures: # These build invocations are informational only, and are expected to fail
|
||||||
|
needs: basic-build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
|
|
Loading…
Reference in a new issue