Skip to content

Commit

Permalink
feat(test): input for gradle test task
Browse files Browse the repository at this point in the history
  • Loading branch information
pbhandari-turo committed Oct 10, 2023
1 parent ada9f0b commit a51995a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
13 changes: 13 additions & 0 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ jobs:
gradlew-args: --debug
```
### Running specific test task
```yaml
jobs:
test:
steps:
- name: Test
uses: open-turo/actions-jvm/test@v1
with:
gradle-task: integrationTest
```
## Inputs
| parameter | description | required | default |
Expand All @@ -36,6 +48,7 @@ jobs:
| github-token | GitHub token that can checkout the repository. e.g. 'secrets.GITHUB_TOKEN' | `true` | |
| artifactory-username | Username to use for Artifactory access | `true` | |
| artifactory-auth-token | Authentication token to use with username for Artifactory access | `true` | |
| gradle-task | An optional string for the gradle test task to run. e.g. "integrationTest" | `false` | `test` |
| gradlew-args | An optional string of command line arguments to pass to gradlew. e.g. "--debug" | `false` | |

## Runs
Expand Down
6 changes: 5 additions & 1 deletion test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ inputs:
artifactory-auth-token:
required: true
description: Authentication token to use with username for Artifactory access
gradle-task:
required: false
description: An optional string for the gradle test task to run. e.g. "integrationTest"
default: "test"
gradlew-args:
required: false
description: An optional string of command line arguments to pass to gradlew. e.g. "--debug"
Expand All @@ -34,4 +38,4 @@ runs:
sdk current
sdk env
sdk current
./gradlew test -PartifactoryUsername=${{ inputs.artifactory-username }} -PartifactoryAuthToken=${{ inputs.artifactory-auth-token }} ${{ inputs.gradlew-args }}
./gradlew ${{ inputs.gradle-task }} -PartifactoryUsername=${{ inputs.artifactory-username }} -PartifactoryAuthToken=${{ inputs.artifactory-auth-token }} ${{ inputs.gradlew-args }}

0 comments on commit a51995a

Please sign in to comment.