mirror of
https://github.com/gradle/actions.git
synced 2025-08-26 03:41:27 +08:00
Improve GHA workflows (#148)
A bunch of improvements to the GHA workflow pipeline including: - Separate workflow for unit tests - Always use a locally-built dist directory for integ-tests - Only run 'quick' integ-tests for non-PR commits. Once a PR is submitted, the 'full' suite will be run on each push.
This commit is contained in:
commit
6a8b99d4b5
2
.github/actions/build-dist/action.yml
vendored
2
.github/actions/build-dist/action.yml
vendored
@ -6,6 +6,8 @@ runs:
|
|||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: sources/package-lock.json
|
||||||
- name: Build distribution
|
- name: Build distribution
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
4
.github/actions/init-integ-test/action.yml
vendored
4
.github/actions/init-integ-test/action.yml
vendored
@ -9,10 +9,8 @@ runs:
|
|||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: 11
|
java-version: 11
|
||||||
|
|
||||||
# Downloads a 'dist' directory artifact that was uploaded in an earlier step
|
# Downloads a 'dist' directory artifact that was uploaded in an earlier 'build-dist' step
|
||||||
# We control this with an environment variable to allow for easier global configuration.
|
|
||||||
- name: Download dist
|
- name: Download dist
|
||||||
if: ${{ env.DOWNLOAD_DIST == 'true' }}
|
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
|
30
.github/workflows/ci-check-and-unit-test.yml
vendored
Normal file
30
.github/workflows/ci-check-and-unit-test.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: CI-check-and-unit-test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-format-and-unit-test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: sources/package-lock.json
|
||||||
|
|
||||||
|
- name: Check formatting and compile
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run check
|
||||||
|
npm run compile
|
||||||
|
working-directory: sources
|
||||||
|
- name: Run unit tests
|
||||||
|
run: |
|
||||||
|
npm test
|
||||||
|
working-directory: sources
|
28
.github/workflows/ci-dependency-review.yml
vendored
28
.github/workflows/ci-dependency-review.yml
vendored
@ -1,28 +0,0 @@
|
|||||||
# Dependency Review Action
|
|
||||||
#
|
|
||||||
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
|
|
||||||
#
|
|
||||||
# Source repository: https://github.com/actions/dependency-review-action
|
|
||||||
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
|
|
||||||
name: CI-dependency-review
|
|
||||||
on: [pull_request]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
dependency-review:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: 'Checkout Repository'
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Dependencies for groovy-dsl
|
|
||||||
uses: ./dependency-submission
|
|
||||||
with:
|
|
||||||
build-root-directory: .github/workflow-samples/groovy-dsl
|
|
||||||
- name: Dependencies for kotlin-dsl
|
|
||||||
uses: ./dependency-submission
|
|
||||||
with:
|
|
||||||
build-root-directory: .github/workflow-samples/kotlin-dsl
|
|
||||||
- name: 'Dependency Review'
|
|
||||||
uses: actions/dependency-review-action@v4
|
|
@ -1,37 +1,48 @@
|
|||||||
name: CI-full-check
|
name: CI-integ-test-full
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
|
||||||
- assigned
|
|
||||||
- review_requested
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- release/**
|
- release/**
|
||||||
paths:
|
|
||||||
- '.github/**'
|
|
||||||
- 'dist/**'
|
|
||||||
- '**/action.yml'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build-distribution:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Build and upload distribution
|
||||||
|
uses: ./.github/actions/build-dist
|
||||||
|
|
||||||
action-inputs:
|
action-inputs:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-action-inputs.yml
|
uses: ./.github/workflows/integ-test-action-inputs.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
|
build-scan-publish:
|
||||||
|
needs: build-distribution
|
||||||
|
uses: ./.github/workflows/integ-test-build-scan-publish.yml
|
||||||
|
with:
|
||||||
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
cache-cleanup:
|
cache-cleanup:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-cache-cleanup.yml
|
uses: ./.github/workflows/integ-test-cache-cleanup.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
caching-config:
|
caching-config:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-caching-config.yml
|
uses: ./.github/workflows/integ-test-caching-config.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
dependency-graph:
|
dependency-graph:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-dependency-graph.yml
|
uses: ./.github/workflows/integ-test-dependency-graph.yml
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@ -39,6 +50,7 @@ jobs:
|
|||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
dependency-submission:
|
dependency-submission:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-dependency-submission.yml
|
uses: ./.github/workflows/integ-test-dependency-submission.yml
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@ -46,21 +58,25 @@ jobs:
|
|||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
dependency-submission-failures:
|
dependency-submission-failures:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-dependency-submission-failures.yml
|
uses: ./.github/workflows/integ-test-dependency-submission-failures.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
execution-with-caching:
|
execution-with-caching:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-execution-with-caching.yml
|
uses: ./.github/workflows/integ-test-execution-with-caching.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
execution:
|
execution:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-execution.yml
|
uses: ./.github/workflows/integ-test-execution.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
develocity-injection:
|
develocity-injection:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-inject-develocity.yml
|
uses: ./.github/workflows/integ-test-inject-develocity.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
@ -68,11 +84,13 @@ jobs:
|
|||||||
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}
|
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}
|
||||||
|
|
||||||
provision-gradle-versions:
|
provision-gradle-versions:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-provision-gradle-versions.yml
|
uses: ./.github/workflows/integ-test-provision-gradle-versions.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
restore-configuration-cache:
|
restore-configuration-cache:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
|
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
@ -80,36 +98,43 @@ jobs:
|
|||||||
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
|
|
||||||
restore-custom-gradle-home:
|
restore-custom-gradle-home:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
|
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
restore-containerized-gradle-home:
|
restore-containerized-gradle-home:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml
|
uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
restore-gradle-home:
|
restore-gradle-home:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-restore-gradle-home.yml
|
uses: ./.github/workflows/integ-test-restore-gradle-home.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
restore-java-toolchain:
|
restore-java-toolchain:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
|
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
sample-kotlin-dsl:
|
sample-kotlin-dsl:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
|
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
sample-gradle-plugin:
|
sample-gradle-plugin:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
|
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
toolchain-detection:
|
toolchain-detection:
|
||||||
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-detect-java-toolchains.yml
|
uses: ./.github/workflows/integ-test-detect-java-toolchains.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
@ -1,4 +1,4 @@
|
|||||||
name: CI-quick-check
|
name: CI-integ-test-quick
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@ -8,7 +8,18 @@ on:
|
|||||||
- release/**
|
- release/**
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check-for-pr:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
is-pr-commit: ${{ steps.PR.outputs.pr_found }}
|
||||||
|
steps:
|
||||||
|
- name: Get current PR details
|
||||||
|
uses: 8BitJonny/gh-get-current-pr@3.0.0
|
||||||
|
id: PR
|
||||||
|
|
||||||
build-distribution:
|
build-distribution:
|
||||||
|
needs: check-for-pr
|
||||||
|
if: ${{ needs.check-for-pr.outputs.is-pr-commit == 'false' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
@ -16,34 +27,23 @@ jobs:
|
|||||||
- name: Build and upload distribution
|
- name: Build and upload distribution
|
||||||
uses: ./.github/actions/build-dist
|
uses: ./.github/actions/build-dist
|
||||||
|
|
||||||
run-unit-tests:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Configure Gradle as default for unit test
|
|
||||||
uses: ./setup-gradle
|
|
||||||
with:
|
|
||||||
gradle-version: 8.7
|
|
||||||
- name: Run tests
|
|
||||||
run: |
|
|
||||||
npm install
|
|
||||||
npm run all
|
|
||||||
working-directory: sources
|
|
||||||
|
|
||||||
action-inputs:
|
action-inputs:
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-action-inputs.yml
|
uses: ./.github/workflows/integ-test-action-inputs.yml
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
||||||
|
build-scan-publish:
|
||||||
|
needs: build-distribution
|
||||||
|
uses: ./.github/workflows/integ-test-build-scan-publish.yml
|
||||||
|
with:
|
||||||
|
runner-os: '["ubuntu-latest"]'
|
||||||
|
|
||||||
cache-cleanup:
|
cache-cleanup:
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-cache-cleanup.yml
|
uses: ./.github/workflows/integ-test-cache-cleanup.yml
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
||||||
cache-key-prefix: ${{github.run_number}}- # Requires a fresh cache entry each run
|
cache-key-prefix: ${{github.run_number}}- # Requires a fresh cache entry each run
|
||||||
|
|
||||||
caching-config:
|
caching-config:
|
||||||
@ -51,7 +51,6 @@ jobs:
|
|||||||
uses: ./.github/workflows/integ-test-caching-config.yml
|
uses: ./.github/workflows/integ-test-caching-config.yml
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
||||||
|
|
||||||
dependency-graph:
|
dependency-graph:
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
@ -60,7 +59,6 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
||||||
|
|
||||||
dependency-submission:
|
dependency-submission:
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
@ -69,7 +67,6 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
||||||
|
|
||||||
dependency-submission-failures:
|
dependency-submission-failures:
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
@ -78,28 +75,25 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
||||||
|
|
||||||
execution-with-caching:
|
execution-with-caching:
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-execution-with-caching.yml
|
uses: ./.github/workflows/integ-test-execution-with-caching.yml
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
||||||
|
|
||||||
execution:
|
execution:
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-execution.yml
|
uses: ./.github/workflows/integ-test-execution.yml
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
||||||
|
|
||||||
develocity-injection:
|
develocity-injection:
|
||||||
|
if: ${{ vars.HAS_GRADLE_ACTIONS_SECRETS == 'true' }}
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-inject-develocity.yml
|
uses: ./.github/workflows/integ-test-inject-develocity.yml
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
||||||
secrets:
|
secrets:
|
||||||
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}
|
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}
|
||||||
|
|
||||||
@ -108,60 +102,50 @@ jobs:
|
|||||||
uses: ./.github/workflows/integ-test-provision-gradle-versions.yml
|
uses: ./.github/workflows/integ-test-provision-gradle-versions.yml
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
||||||
|
|
||||||
restore-configuration-cache:
|
restore-configuration-cache:
|
||||||
|
if: ${{ vars.HAS_GRADLE_ACTIONS_SECRETS == 'true' }}
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
|
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
||||||
secrets:
|
secrets:
|
||||||
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||||
|
|
||||||
restore-containerized-gradle-home:
|
restore-containerized-gradle-home:
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml
|
uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml
|
||||||
with:
|
|
||||||
download-dist: true
|
|
||||||
|
|
||||||
restore-custom-gradle-home:
|
restore-custom-gradle-home:
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
|
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
|
||||||
with:
|
|
||||||
download-dist: true
|
|
||||||
|
|
||||||
restore-gradle-home:
|
restore-gradle-home:
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-restore-gradle-home.yml
|
uses: ./.github/workflows/integ-test-restore-gradle-home.yml
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
||||||
|
|
||||||
restore-java-toolchain:
|
restore-java-toolchain:
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
|
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
||||||
|
|
||||||
sample-kotlin-dsl:
|
sample-kotlin-dsl:
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
|
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
||||||
|
|
||||||
sample-gradle-plugin:
|
sample-gradle-plugin:
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
|
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
||||||
|
|
||||||
toolchain-detection:
|
toolchain-detection:
|
||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/integ-test-detect-java-toolchains.yml
|
uses: ./.github/workflows/integ-test-detect-java-toolchains.yml
|
||||||
with:
|
with:
|
||||||
runner-os: '["ubuntu-latest"]'
|
runner-os: '["ubuntu-latest"]'
|
||||||
download-dist: true
|
|
2
.github/workflows/ci-verify-outputs.yml
vendored
2
.github/workflows/ci-verify-outputs.yml
vendored
@ -20,6 +20,8 @@ jobs:
|
|||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: sources/package-lock.json
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
npm -v
|
npm -v
|
||||||
|
25
.github/workflows/dependency-submission-save.yml
vendored
25
.github/workflows/dependency-submission-save.yml
vendored
@ -1,25 +0,0 @@
|
|||||||
name: Test dependency-submission save
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
dependency-submission-save:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Initialize integ-test
|
|
||||||
uses: ./.github/actions/init-integ-test
|
|
||||||
|
|
||||||
- name: Generate and save dependency graph
|
|
||||||
uses: ./dependency-submission
|
|
||||||
with:
|
|
||||||
build-root-directory: .github/workflow-samples/groovy-dsl
|
|
||||||
dependency-graph: generate-and-upload
|
|
||||||
env:
|
|
||||||
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
|
@ -1,23 +0,0 @@
|
|||||||
name: Test dependency-submission submit
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_run:
|
|
||||||
workflows: ['Test dependency-submission save']
|
|
||||||
types: [completed]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
dependency-submission-submit:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Initialize integ-test
|
|
||||||
uses: ./.github/actions/init-integ-test
|
|
||||||
|
|
||||||
- name: Download and submit dependency graph
|
|
||||||
uses: ./dependency-submission
|
|
||||||
with:
|
|
||||||
dependency-graph: download-and-submit
|
|
65
.github/workflows/dependency-submission.yml
vendored
65
.github/workflows/dependency-submission.yml
vendored
@ -1,65 +0,0 @@
|
|||||||
name: Test dependency-submission
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test-dependency-submission:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Initialize integ-test
|
|
||||||
uses: ./.github/actions/init-integ-test
|
|
||||||
|
|
||||||
- name: Generate and submit dependencies
|
|
||||||
uses: ./dependency-submission
|
|
||||||
with:
|
|
||||||
build-root-directory: .github/workflow-samples/groovy-dsl
|
|
||||||
env:
|
|
||||||
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
|
||||||
|
|
||||||
test-gradle-versions:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
gradle: [8.0.2, 7.6.4, 7.1.1, 6.9.4, 6.0.1, 5.6.4, 5.2.1]
|
|
||||||
include:
|
|
||||||
- gradle: 5.6.4
|
|
||||||
build-root-suffix: -gradle-5
|
|
||||||
- gradle: 5.2.1
|
|
||||||
build-root-suffix: -gradle-5
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Initialize integ-test
|
|
||||||
uses: ./.github/actions/init-integ-test
|
|
||||||
|
|
||||||
- name: Generate and submit dependencies
|
|
||||||
uses: ./dependency-submission
|
|
||||||
with:
|
|
||||||
gradle-version: ${{ matrix.gradle }}
|
|
||||||
build-root-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
|
|
||||||
env:
|
|
||||||
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
|
||||||
|
|
||||||
test-after-setup-gradle:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Initialize integ-test
|
|
||||||
uses: ./.github/actions/init-integ-test
|
|
||||||
|
|
||||||
- name: Setup Gradle
|
|
||||||
uses: ./setup-gradle
|
|
||||||
- name: Generate and submit dependencies
|
|
||||||
id: dependency-submission
|
|
||||||
uses: ./dependency-submission
|
|
||||||
with:
|
|
||||||
build-root-directory: .github/workflow-samples/groovy-dsl
|
|
@ -8,12 +8,8 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: action-inputs-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: action-inputs-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
53
.github/workflows/integ-test-build-scan-publish.yml
vendored
Normal file
53
.github/workflows/integ-test-build-scan-publish.yml
vendored
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
name: Test develocity injection
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
cache-key-prefix:
|
||||||
|
type: string
|
||||||
|
runner-os:
|
||||||
|
type: string
|
||||||
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
|
|
||||||
|
env:
|
||||||
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: build-scan-publish-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-scan-publish:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
gradle: [current, 7.6.2, 6.9.4, 5.6.4]
|
||||||
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Initialize integ-test
|
||||||
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: 8
|
||||||
|
- name: Setup Gradle
|
||||||
|
id: setup-gradle
|
||||||
|
uses: ./setup-gradle
|
||||||
|
with:
|
||||||
|
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
||||||
|
gradle-version: ${{ matrix.gradle }}
|
||||||
|
build-scan-publish: true
|
||||||
|
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
|
||||||
|
build-scan-terms-of-use-agree: "yes"
|
||||||
|
- name: Run Gradle build
|
||||||
|
id: gradle
|
||||||
|
working-directory: .github/workflow-samples/no-ge
|
||||||
|
run: gradle help
|
||||||
|
- name: Check Build Scan url
|
||||||
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
core.setFailed('No Build Scan detected')
|
||||||
|
|
@ -8,12 +8,8 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: integ-test-cache-cleanup-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: integ-test-cache-cleanup-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -8,12 +8,8 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: action-inputs-caching-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: action-inputs-caching-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -104,7 +100,7 @@ jobs:
|
|||||||
|
|
||||||
# Test that build scans are captured when caching is disabled because Gradle User Home already exists
|
# Test that build scans are captured when caching is disabled because Gradle User Home already exists
|
||||||
cache-disabled-pre-existing-gradle-home:
|
cache-disabled-pre-existing-gradle-home:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest # This test only runs on Ubuntu
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -8,15 +8,11 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -120,7 +116,11 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
config-cache:
|
config-cache:
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -8,12 +8,8 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest"]'
|
default: '["ubuntu-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -8,15 +8,11 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -162,7 +158,11 @@ jobs:
|
|||||||
build-root-directory: .github/workflow-samples/groovy-dsl
|
build-root-directory: .github/workflow-samples/groovy-dsl
|
||||||
|
|
||||||
config-cache:
|
config-cache:
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -194,4 +194,50 @@ jobs:
|
|||||||
echo "Expected no dependency graph files to be generated"
|
echo "Expected no dependency graph files to be generated"
|
||||||
ls -l dependency-graph-reports
|
ls -l dependency-graph-reports
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
gradle-versions:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
|
gradle: [8.0.2, 7.6.4, 7.1.1, 6.9.4, 6.0.1, 5.6.4, 5.2.1]
|
||||||
|
include:
|
||||||
|
- gradle: 5.6.4
|
||||||
|
build-root-suffix: -gradle-5
|
||||||
|
- gradle: 5.2.1
|
||||||
|
build-root-suffix: -gradle-5
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Initialize integ-test
|
||||||
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
- name: Generate and submit dependencies
|
||||||
|
uses: ./dependency-submission
|
||||||
|
with:
|
||||||
|
gradle-version: ${{ matrix.gradle }}
|
||||||
|
build-root-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
|
||||||
|
env:
|
||||||
|
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
|
||||||
|
|
||||||
|
after-setup-gradle:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Initialize integ-test
|
||||||
|
uses: ./.github/actions/init-integ-test
|
||||||
|
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: ./setup-gradle
|
||||||
|
- name: Generate and submit dependencies
|
||||||
|
id: dependency-submission
|
||||||
|
uses: ./dependency-submission
|
||||||
|
with:
|
||||||
|
build-root-directory: .github/workflow-samples/groovy-dsl
|
||||||
|
@ -8,12 +8,8 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: detect-java-toolchain-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: detect-java-toolchain-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -8,12 +8,8 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: execution-with-caching-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: execution-with-caching-${{ inputs.cache-key-prefix }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
||||||
|
|
||||||
|
4
.github/workflows/integ-test-execution.yml
vendored
4
.github/workflows/integ-test-execution.yml
vendored
@ -8,12 +8,8 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: execution-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: execution-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -8,16 +8,12 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
secrets:
|
secrets:
|
||||||
DEVELOCITY_ACCESS_KEY:
|
DEVELOCITY_ACCESS_KEY:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: inject-develocity-${{ inputs.cache-key-prefix }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: provision-gradle-versions-${{ inputs.cache-key-prefix }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
inject-develocity:
|
inject-develocity:
|
||||||
@ -34,7 +30,7 @@ jobs:
|
|||||||
gradle: [current, 7.6.2, 6.9.4, 5.6.4]
|
gradle: [current, 7.6.2, 6.9.4, 5.6.4]
|
||||||
os: ${{fromJSON(inputs.runner-os)}}
|
os: ${{fromJSON(inputs.runner-os)}}
|
||||||
plugin-version: [3.16.2, 3.17]
|
plugin-version: [3.16.2, 3.17]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -62,41 +58,3 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No Build Scan detected')
|
core.setFailed('No Build Scan detected')
|
||||||
|
|
||||||
build-scan-publish:
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
gradle: [current, 7.6.2, 6.9.4, 5.6.4]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout sources
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Initialize integ-test
|
|
||||||
uses: ./.github/actions/init-integ-test
|
|
||||||
|
|
||||||
- name: Setup Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: 8
|
|
||||||
- name: Setup Gradle
|
|
||||||
id: setup-gradle
|
|
||||||
uses: ./setup-gradle
|
|
||||||
with:
|
|
||||||
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
|
||||||
gradle-version: ${{ matrix.gradle }}
|
|
||||||
build-scan-publish: true
|
|
||||||
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
|
|
||||||
build-scan-terms-of-use-agree: "yes"
|
|
||||||
- name: Run Gradle build
|
|
||||||
id: gradle
|
|
||||||
working-directory: .github/workflow-samples/no-ge
|
|
||||||
run: gradle help
|
|
||||||
- name: Check Build Scan url
|
|
||||||
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
core.setFailed('No Build Scan detected')
|
|
||||||
|
|
||||||
|
@ -8,12 +8,8 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: provision-gradle-versions-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: provision-gradle-versions-${{ inputs.cache-key-prefix }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
||||||
|
|
||||||
|
@ -8,15 +8,11 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
secrets:
|
secrets:
|
||||||
GRADLE_ENCRYPTION_KEY:
|
GRADLE_ENCRYPTION_KEY:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-configuration-cache-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-configuration-cache-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -5,12 +5,8 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
cache-key-prefix:
|
cache-key-prefix:
|
||||||
type: string
|
type: string
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -5,12 +5,8 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
cache-key-prefix:
|
cache-key-prefix:
|
||||||
type: string
|
type: string
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -8,12 +8,8 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-gradle-home-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-gradle-home-${{ inputs.cache-key-prefix }}
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-gradle-home
|
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-gradle-home
|
||||||
|
|
||||||
|
@ -8,12 +8,8 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-java-toolchain-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-java-toolchain-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -8,12 +8,8 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-gradle-plugin-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-gradle-plugin-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -8,12 +8,8 @@ on:
|
|||||||
runner-os:
|
runner-os:
|
||||||
type: string
|
type: string
|
||||||
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
|
||||||
download-dist:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOWNLOAD_DIST: ${{ inputs.download-dist }}
|
|
||||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-kotlin-dsl-${{ inputs.cache-key-prefix }}
|
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-kotlin-dsl-${{ inputs.cache-key-prefix }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -5,17 +5,18 @@
|
|||||||
"description": "Execute Gradle Build",
|
"description": "Execute Gradle Build",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "patch-package",
|
"postinstall": "patch-package",
|
||||||
"format": "prettier --write 'src/**/*.ts'",
|
"prettier-write": "prettier --write 'src/**/*.ts'",
|
||||||
"format-check": "prettier --check 'src/**/*.ts'",
|
"prettier-check": "prettier --check 'src/**/*.ts'",
|
||||||
"lint": "eslint 'src/**/*.ts'",
|
"lint": "eslint 'src/**/*.ts'",
|
||||||
"compile-dependency-submission-main": "ncc build src/dependency-submission/main.ts --out ../dist/dependency-submission/main --source-map --no-source-map-register",
|
"compile-dependency-submission-main": "ncc build src/dependency-submission/main.ts --out ../dist/dependency-submission/main --source-map --no-source-map-register",
|
||||||
"compile-dependency-submission-post": "ncc build src/dependency-submission/post.ts --out ../dist/dependency-submission/post --source-map --no-source-map-register",
|
"compile-dependency-submission-post": "ncc build src/dependency-submission/post.ts --out ../dist/dependency-submission/post --source-map --no-source-map-register",
|
||||||
"compile-setup-gradle-main": "ncc build src/setup-gradle/main.ts --out ../dist/setup-gradle/main --source-map --no-source-map-register",
|
"compile-setup-gradle-main": "ncc build src/setup-gradle/main.ts --out ../dist/setup-gradle/main --source-map --no-source-map-register",
|
||||||
"compile-setup-gradle-post": "ncc build src/setup-gradle/post.ts --out ../dist/setup-gradle/post --source-map --no-source-map-register",
|
"compile-setup-gradle-post": "ncc build src/setup-gradle/post.ts --out ../dist/setup-gradle/post --source-map --no-source-map-register",
|
||||||
"compile": "npm-run-all --parallel compile-*",
|
"compile": "npm-run-all --parallel compile-*",
|
||||||
"check": "npm-run-all --parallel format lint",
|
"check": "npm-run-all --parallel prettier-check lint",
|
||||||
|
"format": "npm-run-all --parallel prettier-write lint",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"build": "npm run check && npm run compile",
|
"build": "npm run format && npm run compile",
|
||||||
"all": "npm run build && npm test"
|
"all": "npm run build && npm test"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user