generated from actions/typescript-action
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #294 from gradle/dd/dpe
Various improvements to CI workflows - Compose all integ-test workflow executions into a single calling workflow - Added a 'quick-check' workflow that provides faster feedback on branches other than main - Only runs on ubuntu-latest - Reuses cache entries from previous runs - Builds distribution outputs so that these don't need to be committed during everyday development - Added a workflow for purging old workflow executions Together with the fix for #293, these changes fix #291
- Loading branch information
Showing
28 changed files
with
713 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: 'Build and upload distribution' | ||
# Builds the action distribution an uploads as an artifact for later download | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Build distribution | ||
shell: bash | ||
run: | | ||
npm install | ||
npm run all | ||
- name: Upload distribution | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: 'Download dist' | ||
# Downloads a 'dist' directory artifact that was uploaded in an earlier step | ||
# We control this with an environment variable to allow for easier global configuration. | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Download dist | ||
if: ${{ env.DOWNLOAD_DIST == 'true' }} | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: full-check | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- assigned | ||
- review_requested | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
action-inputs: | ||
uses: ./.github/workflows/integ-test-action-inputs.yml | ||
with: | ||
cache-key-prefix: ${{github.run_number}}- | ||
|
||
caching-config: | ||
uses: ./.github/workflows/integ-test-action-inputs-caching.yml | ||
with: | ||
cache-key-prefix: ${{github.run_number}}- | ||
|
||
execution-with-caching: | ||
uses: ./.github/workflows/integ-test-execution-with-caching.yml | ||
with: | ||
cache-key-prefix: ${{github.run_number}}- | ||
|
||
execution: | ||
uses: ./.github/workflows/integ-test-execution.yml | ||
with: | ||
cache-key-prefix: ${{github.run_number}}- | ||
|
||
gradle-versions: | ||
uses: ./.github/workflows/integ-test-gradle-versions.yml | ||
with: | ||
cache-key-prefix: ${{github.run_number}}- | ||
|
||
restore-configuration-cache: | ||
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml | ||
with: | ||
cache-key-prefix: ${{github.run_number}}- | ||
|
||
restore-custom-gradle-home: | ||
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml | ||
with: | ||
cache-key-prefix: ${{github.run_number}}- | ||
|
||
restore-gradle-home: | ||
uses: ./.github/workflows/integ-test-restore-gradle-home.yml | ||
with: | ||
cache-key-prefix: ${{github.run_number}}- | ||
|
||
restore-java-toolchain: | ||
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml | ||
with: | ||
cache-key-prefix: ${{github.run_number}}- | ||
|
||
sample-kotlin-dsl: | ||
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml | ||
with: | ||
cache-key-prefix: ${{github.run_number}}- | ||
|
||
sample-gradle-plugin: | ||
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml | ||
with: | ||
cache-key-prefix: ${{github.run_number}}- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: quick-check | ||
|
||
on: | ||
push: | ||
branches-ignore: main | ||
|
||
jobs: | ||
build-distribution: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
- name: Build and upload distribution | ||
uses: ./.github/actions/build-dist | ||
|
||
action-inputs: | ||
needs: build-distribution | ||
uses: ./.github/workflows/integ-test-action-inputs.yml | ||
with: | ||
runner-os: '["ubuntu-latest"]' | ||
download-dist: true | ||
|
||
caching-config: | ||
needs: build-distribution | ||
uses: ./.github/workflows/integ-test-action-inputs-caching.yml | ||
with: | ||
runner-os: '["ubuntu-latest"]' | ||
download-dist: true | ||
|
||
execution-with-caching: | ||
needs: build-distribution | ||
uses: ./.github/workflows/integ-test-execution-with-caching.yml | ||
with: | ||
runner-os: '["ubuntu-latest"]' | ||
download-dist: true | ||
|
||
execution: | ||
needs: build-distribution | ||
uses: ./.github/workflows/integ-test-execution.yml | ||
with: | ||
runner-os: '["ubuntu-latest"]' | ||
download-dist: true | ||
|
||
gradle-versions: | ||
needs: build-distribution | ||
uses: ./.github/workflows/integ-test-gradle-versions.yml | ||
with: | ||
runner-os: '["ubuntu-latest"]' | ||
download-dist: true | ||
|
||
# restore-configuration-cache: | ||
# needs: build-distribution | ||
# uses: ./.github/workflows/integ-test-restore-configuration-cache.yml | ||
# with: | ||
# runner-os: '["ubuntu-latest"]' | ||
# download-dist: true | ||
|
||
restore-custom-gradle-home: | ||
needs: build-distribution | ||
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml | ||
with: | ||
runner-os: '["ubuntu-latest"]' | ||
download-dist: true | ||
|
||
restore-gradle-home: | ||
needs: build-distribution | ||
uses: ./.github/workflows/integ-test-restore-gradle-home.yml | ||
with: | ||
runner-os: '["ubuntu-latest"]' | ||
download-dist: true | ||
|
||
restore-java-toolchain: | ||
needs: build-distribution | ||
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml | ||
with: | ||
runner-os: '["ubuntu-latest"]' | ||
download-dist: true | ||
|
||
sample-kotlin-dsl: | ||
needs: build-distribution | ||
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml | ||
with: | ||
runner-os: '["ubuntu-latest"]' | ||
download-dist: true | ||
|
||
sample-gradle-plugin: | ||
needs: build-distribution | ||
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml | ||
with: | ||
runner-os: '["ubuntu-latest"]' | ||
download-dist: true |
8 changes: 6 additions & 2 deletions
8
.github/workflows/dev.yml → .github/workflows/ci-verify-outputs.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Test different action inputs | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
cache-key-prefix: | ||
type: string | ||
runner-os: | ||
type: string | ||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]' | ||
download-dist: | ||
type: boolean | ||
default: false | ||
|
||
env: | ||
DOWNLOAD_DIST: ${{ inputs.download-dist }} | ||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: action-inputs-${{ inputs.cache-key-prefix }} | ||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true | ||
|
||
jobs: | ||
action-inputs: | ||
strategy: | ||
matrix: | ||
os: ${{fromJSON(inputs.runner-os)}} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
- name: Download distribution if required | ||
uses: ./.github/actions/download-dist | ||
- name: Invoke with multi-line arguments | ||
uses: ./ | ||
with: | ||
build-root-directory: .github/workflow-samples/groovy-dsl | ||
arguments: | | ||
--configuration-cache | ||
--build-cache | ||
-DsystemProperty=FOO | ||
-PgradleProperty=BAR | ||
test | ||
jar |
Oops, something went wrong.