Unverified Commit 0206df02 authored by Paul Merlin's avatar Paul Merlin Committed by GitHub
Browse files

Merge pull request #59 from eskatos/dd/v1-improved

Minor cleanups, simplifications and improvements
parents 41ca2299 41aebc77
Loading
Loading
Loading
Loading
+41 −8
Changes for .github/workflows/prod.yml: 41 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ on:
  push:

jobs:
  check:
  gradle-execution:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
@@ -22,12 +22,6 @@ jobs:
      with:
        build-root-directory: __tests__/samples/basic
        arguments: test
    - name: Test custom wrapper location
      uses: ./
      with:
        build-root-directory: __tests__/samples/no-wrapper
        wrapper-directory: __tests__/samples/basic
        arguments: help
    - name: Test use defined Gradle version
      uses: ./
      with:
@@ -37,7 +31,7 @@ jobs:
    - name: Test use Gradle version alias
      uses: ./
      with:
        gradle-version: rc
        gradle-version: release-candidate
        build-root-directory: __tests__/samples/no-wrapper
        arguments: help
    - name: Test use defined Gradle executable
@@ -46,6 +40,45 @@ jobs:
        gradle-executable: __tests__/samples/basic/gradlew${{ matrix.script-suffix }}
        build-root-directory: __tests__/samples/no-wrapper
        arguments: help
    - name: Test custom wrapper location (deprecated)
      uses: ./
      with:
        build-root-directory: __tests__/samples/no-wrapper
        wrapper-directory: __tests__/samples/basic
        arguments: help

  dependencies-cache:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
    - name: Checkout sources
      uses: actions/checkout@v2
    - name: Test dependencies-cache-enabled
      uses: ./
      with:
        build-root-directory: __tests__/samples/basic
        arguments: test --no-daemon
        dependencies-cache-enabled: true

  configuration-cache:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
    - name: Checkout sources
      uses: actions/checkout@v2
    - name: Test configuration-cache-enabled
      uses: ./
      with:
        build-root-directory: __tests__/samples/basic
        arguments: test --configuration-cache --no-daemon
        configuration-cache-enabled: true
        dependencies-cache-enabled: true 
        # Configuration cache requires dependencies cache, since it assumes dependencies are already downloaded.


  failures: # These build invocations are informational only, and are expected to fail
    runs-on: ubuntu-latest
+8 −6
Changes for README.md: 8 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -60,22 +60,24 @@ If you need to pass environment variables, simply use the GitHub Actions workflo
    build-root-directory: some/subdirectory
```

## Use a Gradle wrapper from a different directory
## Use a specific `gradle` executable

```yaml
 - uses: eskatos/gradle-command-action@v1
   with:
     wrapper-directory: path/to/wrapper-directory
     gradle-executable: path/to/gradle
```

## Use a specific `gradle` executable
## Use a Gradle wrapper from a different directory
 
```yaml
 - uses: eskatos/gradle-command-action@v1
   with:
     gradle-executable: path/to/gradle
     gradle-executable: path/to/gradlew
 ```

 NOTE: The `wrapper-directory` input has been deprecated. Use `gradle-executable` instead.

## Setup and use a declared Gradle version

```yaml
@@ -92,7 +94,7 @@ Moreover, you can use the following aliases:
| --- |---|
| `wrapper`           | The Gradle wrapper's version (default, useful for matrix builds) |
| `current`           | The current [stable release](https://gradle.org/install/) |
| `rc`      | The current [release candidate](https://gradle.org/release-candidate/) if any, otherwise fallback to `current` |
| `release-candidate` | The current [release candidate](https://gradle.org/release-candidate/) if any, otherwise fallback to `current` |
| `nightly`           | The latest [nightly](https://gradle.org/nightly/), fails if none. |
| `release-nightly`   | The latest [release nightly](https://gradle.org/release-nightly/), fails if none.      |

@@ -114,7 +116,7 @@ jobs:
        java-version: 11
    - uses: eskatos/gradle-command-action@v1
      with:
        gradle-version: rc
        gradle-version: release-candidate
        arguments: build --dry-run # just test build configuration
```

+7
Changes for action.yml: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ inputs:
  wrapper-directory:
    description: Path to the Gradle Wrapper directory
    required: false
    deprecationMessage: Use 'gradle-executable' to point to a gradlew[.bat] file in a non-default location
  gradle-executable:
    description: Path to the Gradle executable
    required: false
@@ -23,28 +24,34 @@ inputs:
  distributions-cache-enabled:
    description: Whether caching downloaded Gradle distributions is enabled or not, default to 'true'
    required: false
    default: true
  wrapper-cache-enabled:
    description: Whether caching wrapper installation is enabled or not, default to 'true'
    required: false
    default: true
    deprecationMessage: Replaced by 'distributions-cache-enabled' which enables caching for all downloaded Gradle distributions
  dependencies-cache-enabled:
    description: Whether caching dependencies is enabled or not, default to 'false'
    required: false
    default: false
  dependencies-cache-key:
    description: Globs of files to hash in the build root directory, separated by new lines, use best-effort if unset
    required: false
  dependencies-cache-exact:
    description: Whether to restore only if exact match, default to 'false'
    required: false
    default: false
  configuration-cache-enabled:
    description: Whether caching build configuration is enabled or not, default to 'false'
    required: false
    default: false
  configuration-cache-key:
    description: Globs of files to hash in the build root directory, separated by new lines, use best-effort if unset
    required: false
  configuration-cache-exact:
    description: Whether to restore only if exact match, default to 'false'
    required: false
    default: false

outputs:
  build-scan-url:
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

Loading