Compare commits

..

92 Commits

Author SHA1 Message Date
bigdaz
473878a77f [bot] Update dist directory 2024-11-12 03:55:37 +00:00
daz
f22ac61fd1 Use Gradle 8.11 as the minimum version for cache-cleanup
The cache-cleanup API has changed, so the init-script that worked with
Gradle 8.9 no longer works with 8.11.
We now provision and use Gradle 8.11 for cache cleanup.

This provides a band-aid fix for #417 but that issue will still impact
any build configured to run with Gradle > 8.11
2024-11-11 20:54:29 -07:00
daz
4ec844e551 npm audit fix 2024-11-11 20:54:29 -07:00
bigdaz
24ca383271 [bot] Update dist directory 2024-11-11 19:51:02 +00:00
Daz DeBoer
4ca2d5d749 Dependency updates (#429) 2024-11-11 12:49:55 -07:00
daz
f31476bde2 Update test for real-world data
This test assumed that at least one 'snapshot' wrapper checksum was unique,
and not contained in the set of wrapper checksums for released distributions.
This is no longer the case, so the assumption has been modified.
2024-11-11 12:18:11 -07:00
bigdaz
c345cfbe93 Update known wrapper checksums 2024-11-11 12:18:11 -07:00
dependabot[bot]
b526f6673b Bump com.fasterxml.jackson.dataformat:jackson-dataformat-smile
Bumps [com.fasterxml.jackson.dataformat:jackson-dataformat-smile](https://github.com/FasterXML/jackson-dataformats-binary) from 2.18.0 to 2.18.1.
- [Commits](https://github.com/FasterXML/jackson-dataformats-binary/compare/jackson-dataformats-binary-2.18.0...jackson-dataformats-binary-2.18.1)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-smile
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-11 12:18:11 -07:00
daz
93415e6645 Update patch for actions/cache 3.3.0 2024-11-11 12:18:11 -07:00
dependabot[bot]
6bc218d5d0 Bump the npm-dependencies group across 1 directory with 4 updates
Bumps the npm-dependencies group with 4 updates in the /sources directory: [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) and [nock](https://github.com/nock/nock).


Updates `@actions/cache` from 3.2.4 to 3.3.0
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

Updates `@types/node` from 20.17.3 to 20.17.6
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint-plugin-jest` from 28.8.3 to 28.9.0
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v28.8.3...v28.9.0)

Updates `nock` from 13.5.5 to 13.5.6
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.5.5...v13.5.6)

---
updated-dependencies:
- dependency-name: "@actions/cache"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-11 11:34:26 -07:00
Daniel Shuy
9d68e8b435 Update build reports path for multi-project build 2024-11-11 11:16:22 -07:00
dependabot[bot]
707359876a Bump @types/node
Bumps the npm-dependencies group with 1 update in the /sources directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 20.17.2 to 20.17.3
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 18:31:04 -06:00
bigdaz
4103f31d4d [bot] Update dist directory 2024-10-31 00:29:22 +00:00
dependabot[bot]
15020cf347 Bump the npm-dependencies group across 1 directory with 4 updates
Bumps the npm-dependencies group with 4 updates in the /sources directory: [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact), [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [typescript](https://github.com/microsoft/TypeScript).


Updates `@actions/artifact` from 2.1.10 to 2.1.11
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/artifact/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/artifact)

Updates `@types/jest` from 29.5.13 to 29.5.14
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Updates `@types/node` from 20.16.11 to 20.17.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `typescript` from 5.6.2 to 5.6.3
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.6.2...v5.6.3)

---
updated-dependencies:
- dependency-name: "@actions/artifact"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 18:28:10 -06:00
dependabot[bot]
ed43923279 Bump org.junit.jupiter:junit-jupiter
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.2 to 5.11.3.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.2...r5.11.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-30 18:28:10 -06:00
bigdaz
6dafcf2d22 [bot] Update dist directory 2024-10-30 23:59:49 +00:00
bigdaz
2ca30c9a83 Update known wrapper checksums 2024-10-30 17:58:46 -06:00
bigdaz
bb0c460cbf [bot] Update dist directory 2024-10-10 08:25:45 +00:00
dependabot[bot]
0674891af5 Bump the npm-dependencies group across 1 directory with 5 updates
Bumps the npm-dependencies group with 5 updates in the /sources directory:

| Package | From | To |
| --- | --- | --- |
| [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact) | `2.1.9` | `2.1.10` |
| [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) | `1.10.1` | `1.11.1` |
| [@octokit/webhooks-types](https://github.com/octokit/webhooks) | `7.5.1` | `7.6.1` |
| [which](https://github.com/npm/node-which) | `4.0.0` | `5.0.0` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.16.10` | `20.16.11` |



Updates `@actions/artifact` from 2.1.9 to 2.1.10
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/artifact/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/artifact)

Updates `@actions/core` from 1.10.1 to 1.11.1
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Updates `@octokit/webhooks-types` from 7.5.1 to 7.6.1
- [Release notes](https://github.com/octokit/webhooks/releases)
- [Commits](https://github.com/octokit/webhooks/compare/v7.5.1...v7.6.1)

Updates `which` from 4.0.0 to 5.0.0
- [Release notes](https://github.com/npm/node-which/releases)
- [Changelog](https://github.com/npm/node-which/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-which/compare/v4.0.0...v5.0.0)

Updates `@types/node` from 20.16.10 to 20.16.11
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@actions/artifact"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@octokit/webhooks-types"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: which
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-10 02:24:34 -06:00
dependabot[bot]
1b7e89588d Bump org.junit.jupiter:junit-jupiter
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.1 to 5.11.2.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.1...r5.11.2)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-06 20:38:26 -06:00
bigdaz
b0cc090202 [bot] Update dist directory 2024-10-07 02:37:40 +00:00
Daz DeBoer
872d6b954c Dependency updates (#411) 2024-10-06 20:36:28 -06:00
daz
61e4a25782 Control version of Gradle in PATH for unit tests 2024-10-07 12:24:47 +10:00
dependabot[bot]
f4e0ea0cdd Bump the npm-dependencies group across 1 directory with 4 updates
Bumps the npm-dependencies group with 4 updates in the /sources directory: [typed-rest-client](https://github.com/Microsoft/typed-rest-client), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [@vercel/ncc](https://github.com/vercel/ncc) and [eslint](https://github.com/eslint/eslint).


Updates `typed-rest-client` from 2.0.2 to 2.1.0
- [Release notes](https://github.com/Microsoft/typed-rest-client/releases)
- [Commits](https://github.com/Microsoft/typed-rest-client/compare/v2.0.2...v2.1.0)

Updates `@types/node` from 20.16.5 to 20.16.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@vercel/ncc` from 0.38.1 to 0.38.2
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.38.1...0.38.2)

Updates `eslint` from 8.57.0 to 8.57.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.57.0...v8.57.1)

---
updated-dependencies:
- dependency-name: typed-rest-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 11:24:36 +10:00
dependabot[bot]
9f70748719 Bump org.junit.jupiter:junit-jupiter
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.11.0 to 5.11.1.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.11.0...r5.11.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 11:24:35 +10:00
dependabot[bot]
ff4a71656f Bump com.fasterxml.jackson.dataformat:jackson-dataformat-smile
Bumps [com.fasterxml.jackson.dataformat:jackson-dataformat-smile](https://github.com/FasterXML/jackson-dataformats-binary) from 2.17.2 to 2.18.0.
- [Commits](https://github.com/FasterXML/jackson-dataformats-binary/compare/jackson-dataformats-binary-2.17.2...jackson-dataformats-binary-2.18.0)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-smile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 11:24:35 +10:00
dependabot[bot]
b5e8e5f396 Bump com.google.guava:guava in /.github/workflow-samples/kotlin-dsl
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.3.0-jre to 33.3.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 11:24:35 +10:00
bigdaz
7605d180a5 Update known wrapper checksums 2024-10-07 11:24:35 +10:00
daz
d32c4bdc08 Update wrapper to Gradle 8.10.2 2024-10-07 11:24:35 +10:00
bigdaz
0d30c9111c [bot] Update dist directory 2024-09-14 22:01:51 +00:00
Daz DeBoer
cf8c435260 Correctly handle multiline patterns for extracted entries (#393) 2024-09-14 16:00:48 -06:00
bigdaz
b4c01c399c [bot] Update dist directory 2024-09-13 17:18:30 +00:00
daz
340f8b64e0 Improve cache logging 2024-09-13 11:17:22 -06:00
bigdaz
36455cb5f4 [bot] Update dist directory 2024-09-13 16:46:55 +00:00
Daz DeBoer
e5c1381176 Include cache save/restore times in Job Summary (#389)
Fixes #370
2024-09-13 10:45:46 -06:00
dependabot[bot]
d156388eb1 Bump path-to-regexp from 6.2.1 to 6.3.0 in /sources
Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) from 6.2.1 to 6.3.0.
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v6.2.1...v6.3.0)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 20:06:01 -06:00
dependabot[bot]
2e93f415f7 Bump the npm-dependencies group across 1 directory with 2 updates
Bumps the npm-dependencies group with 2 updates in the /sources directory: [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) and [eslint-plugin-github](https://github.com/github/eslint-plugin-github).


Updates `@types/jest` from 29.5.12 to 29.5.13
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Updates `eslint-plugin-github` from 5.0.1 to 5.0.2
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v5.0.1...v5.0.2)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 20:06:01 -06:00
bigdaz
ee8dc905e6 [bot] Update dist directory 2024-09-13 01:56:53 +00:00
bot-githubaction
5fe9264c08 Bump references to Develocity Gradle plugin from 3.18 to 3.18.1 2024-09-12 19:55:39 -06:00
dependabot[bot]
29d4d80ef6 Bump the npm-dependencies group across 1 directory with 3 updates
Bumps the npm-dependencies group with 3 updates in the /sources directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) and [typescript](https://github.com/microsoft/TypeScript).


Updates `@types/node` from 20.16.1 to 20.16.5
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint-plugin-jest` from 28.8.0 to 28.8.3
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v28.8.0...v28.8.3)

Updates `typescript` from 5.5.4 to 5.6.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.5.4...v5.6.2)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 19:55:39 -06:00
dependabot[bot]
478782dbb4 Bump peter-evans/create-pull-request in the github-actions group
Bumps the github-actions group with 1 update: [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request).


Updates `peter-evans/create-pull-request` from 6 to 7
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 19:55:39 -06:00
bigdaz
e6215edc51 [bot] Update dist directory 2024-09-13 00:44:35 +00:00
Alexis Tual
765a73447c Fix passing expiresInHours query parameter 2024-09-12 18:43:23 -06:00
Daz DeBoer
a122cf5aa7 Document develocity-token-expiry parameter
Fixes #367
2024-09-12 18:32:17 -06:00
bigdaz
5baa1ded34 [bot] Update dist directory 2024-08-31 17:12:28 +00:00
Daz DeBoer
7e0f050645 Ensure minimum Gradle version for cache-cleanup (#364)
Instead of always installing and using the latest Gradle version for
cache cleanup, we now require at least Gradle 8.9.

This avoids downloading and installing Gradle if the version on PATH is
sufficient to perform cache cleanup.
2024-08-31 11:11:24 -06:00
daz
9291ac6ca5 Add example of job summary with cache-read-only 2024-08-29 09:54:55 -06:00
bigdaz
6da85a08fb [bot] Update dist directory 2024-08-27 03:19:58 +00:00
dependabot[bot]
c3c8a18b22 Bump tj-actions/changed-files from 44 to 45 in the github-actions group
Bumps the github-actions group with 1 update: [tj-actions/changed-files](https://github.com/tj-actions/changed-files).


Updates `tj-actions/changed-files` from 44 to 45
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v44...v45)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 21:18:49 -06:00
dependabot[bot]
9498413fd8 Bump the npm-dependencies group in /sources with 3 updates
Bumps the npm-dependencies group in /sources with 3 updates: [@actions/http-client](https://github.com/actions/toolkit/tree/HEAD/packages/http-client), [nock](https://github.com/nock/nock) and [ts-jest](https://github.com/kulshekhar/ts-jest).


Updates `@actions/http-client` from 2.2.2 to 2.2.3
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/http-client/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/http-client)

Updates `nock` from 13.5.4 to 13.5.5
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.5.4...v13.5.5)

Updates `ts-jest` from 29.2.4 to 29.2.5
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.2.4...v29.2.5)

---
updated-dependencies:
- dependency-name: "@actions/http-client"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 21:18:20 -06:00
Daz DeBoer
16bf8bc8fe Rework docs for Develocity support
Fixes #339
2024-08-26 14:52:14 -06:00
bigdaz
faf4eeacd5 [bot] Update dist directory 2024-08-26 20:49:04 +00:00
Daz DeBoer
4b7cc6e174 Differentiate Gradle 8.1 from 8.10 when checking version (#358)
Fixes #359
2024-08-26 14:47:28 -06:00
daz
0873530e60 Increase Gradle version coverage for init-scripts
As well as testing latest of each major version, also test early release of 6.x and 7.x
2024-08-26 13:57:09 -06:00
bigdaz
f67327f0c8 [bot] Update dist directory 2024-08-26 19:13:13 +00:00
Daz DeBoer
d32a10b3ae Dependency updates (#356)
- Update to DV plugin 3.18
- Update to Gradle 8.10
- Update to address vulnerability in `unzip-stream`
2024-08-26 13:12:08 -06:00
daz
e598a32529 Quote version 8.10 in integ test 2024-08-26 12:47:06 -06:00
dependabot[bot]
d6c8cf816c Bump unzip-stream from 0.3.1 to 0.3.4 in /sources
Bumps [unzip-stream](https://github.com/mhr3/unzip-stream) from 0.3.1 to 0.3.4.
- [Commits](https://github.com/mhr3/unzip-stream/compare/v0.3.1...v0.3.4)

---
updated-dependencies:
- dependency-name: unzip-stream
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 11:10:02 -06:00
dependabot[bot]
79ea5b8f3e Bump org.junit.jupiter:junit-jupiter
Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.3 to 5.11.0.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.10.3...r5.11.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 11:08:49 -06:00
dependabot[bot]
d77a030aaf Bump com.google.guava:guava in /.github/workflow-samples/kotlin-dsl
Bumps [com.google.guava:guava](https://github.com/google/guava) from 33.2.1-jre to 33.3.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 11:08:26 -06:00
daz
a8a2fd2323 Update to Gradle 8.10 2024-08-26 11:07:48 -06:00
bot-githubaction
089bfb1063 Bump references to Develocity Gradle plugin from 3.17.6 to 3.18 2024-08-26 10:53:40 -06:00
bigdaz
ca7f3fa2f5 [bot] Update dist directory 2024-08-26 16:48:43 +00:00
dependabot[bot]
1c29763ff7 Bump the npm-dependencies group across 1 directory with 5 updates
Bumps the npm-dependencies group with 5 updates in the /sources directory:

| Package | From | To |
| --- | --- | --- |
| [@actions/glob](https://github.com/actions/toolkit/tree/HEAD/packages/glob) | `0.4.0` | `0.5.0` |
| [@actions/http-client](https://github.com/actions/toolkit/tree/HEAD/packages/http-client) | `2.2.1` | `2.2.2` |
| [@octokit/rest](https://github.com/octokit/rest.js) | `21.0.1` | `21.0.2` |
| [cheerio](https://github.com/cheeriojs/cheerio) | `1.0.0-rc.12` | `1.0.0` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.14.14` | `20.16.1` |



Updates `@actions/glob` from 0.4.0 to 0.5.0
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/glob/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/glob)

Updates `@actions/http-client` from 2.2.1 to 2.2.2
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/http-client/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/http-client)

Updates `@octokit/rest` from 21.0.1 to 21.0.2
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v21.0.1...v21.0.2)

Updates `cheerio` from 1.0.0-rc.12 to 1.0.0
- [Release notes](https://github.com/cheeriojs/cheerio/releases)
- [Commits](https://github.com/cheeriojs/cheerio/compare/v1.0.0-rc.12...v1.0.0)

Updates `@types/node` from 20.14.14 to 20.16.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@actions/glob"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@actions/http-client"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@octokit/rest"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: cheerio
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 10:47:34 -06:00
bigdaz
1bc1a6c922 Update known wrapper checksums 2024-08-26 10:46:59 -06:00
daz
b51fcf4d6c Only allow 1 integ-test at a time 2024-08-12 10:33:22 -06:00
daz
82758ea0fa Emphasise notice in wrapper-validation docs 2024-08-12 10:03:35 -06:00
bigdaz
835367424c [bot] Update dist directory 2024-08-12 15:59:33 +00:00
bigdaz
1ac097f44e Update known wrapper checksums 2024-08-12 09:58:33 -06:00
dependabot[bot]
60851f5fb2 Bump eslint-plugin-jest in /sources in the npm-dependencies group
Bumps the npm-dependencies group in /sources with 1 update: [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest).


Updates `eslint-plugin-jest` from 28.7.0 to 28.8.0
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v28.7.0...v28.8.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-08 13:46:38 -06:00
bigdaz
e7551dc2a9 [bot] Update dist directory 2024-08-08 19:36:04 +00:00
daz
e482045599 Tweak log message 2024-08-08 13:34:53 -06:00
Marcono1234
631bcacd15 Document that setup-gradle performs wrapper validation 2024-08-07 15:30:54 -06:00
Daz DeBoer
d724da5563 Update RELEASING.md for v4 2024-08-07 11:41:14 -06:00
dependabot[bot]
228ce9b15b Bump @types/unzipper in /sources in the npm-dependencies group
Bumps the npm-dependencies group in /sources with 1 update: [@types/unzipper](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/unzipper).


Updates `@types/unzipper` from 0.10.9 to 0.10.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/unzipper)

---
updated-dependencies:
- dependency-name: "@types/unzipper"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 10:11:26 -06:00
daz
64869b1757 Attempt to reduce contention in integ-test-full 2024-08-07 09:04:49 -06:00
Daz DeBoer
0b404a7148 Reduce Dependabot checks to weekly 2024-08-07 07:58:19 -06:00
dependabot[bot]
4cb1dc0963 Bump the npm-dependencies group across 1 directory with 2 updates
Bumps the npm-dependencies group with 2 updates in the /sources directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser).


Updates `@types/node` from 20.12.4 to 20.14.14
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@typescript-eslint/parser` from 7.11.0 to 7.18.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.18.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-06 09:16:21 -06:00
bigdaz
1eb9607ae7 [bot] Update dist directory 2024-08-06 14:52:54 +00:00
daz
a5a9e731f3 Bump the npm-dependencies group in /sources with 11 updates
Bumps the npm-dependencies group in /sources with 11 updates:

| Package | From | To |
| --- | --- | --- |
| [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact) | `2.1.4` | `2.1.9` |
| [@octokit/rest](https://github.com/octokit/rest.js) | `20.1.0` | `21.0.1` |
| [@octokit/webhooks-types](https://github.com/octokit/webhooks) | `7.5.0` | `7.5.1` |
| [semver](https://github.com/npm/node-semver) | `7.6.0` | `7.6.3` |
| [typed-rest-client](https://github.com/Microsoft/typed-rest-client) | `1.8.11` | `2.0.2` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `7.5.0` | `7.11.0` |
| [eslint-plugin-github](https://github.com/github/eslint-plugin-github) | `4.10.2` | `5.0.1` |
| [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) | `27.9.0` | `28.7.0` |
| [prettier](https://github.com/prettier/prettier) | `3.2.5` | `3.3.3` |
| [ts-jest](https://github.com/kulshekhar/ts-jest) | `29.1.2` | `29.2.4` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.4.3` | `5.5.4` |

Updates `@actions/artifact` from 2.1.4 to 2.1.9
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/artifact/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/artifact)

Updates `@octokit/rest` from 20.1.0 to 21.0.1
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v20.1.0...v21.0.1)

Updates `@octokit/webhooks-types` from 7.5.0 to 7.5.1
- [Release notes](https://github.com/octokit/webhooks/releases)
- [Commits](https://github.com/octokit/webhooks/compare/v7.5.0...v7.5.1)

Updates `semver` from 7.6.0 to 7.6.3
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.6.0...v7.6.3)

Updates `typed-rest-client` from 1.8.11 to 2.0.2
- [Release notes](https://github.com/Microsoft/typed-rest-client/releases)
- [Commits](https://github.com/Microsoft/typed-rest-client/compare/v1.8.11...v2.0.2)

Updates `@typescript-eslint/parser` from 7.5.0 to 7.11.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)

Updates `eslint-plugin-github` from 4.10.2 to 5.0.1
- [Release notes](https://github.com/github/eslint-plugin-github/releases)
- [Commits](https://github.com/github/eslint-plugin-github/compare/v4.10.2...v5.0.1)

Updates `eslint-plugin-jest` from 27.9.0 to 28.7.0
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.9.0...v28.7.0)

Updates `prettier` from 3.2.5 to 3.3.3
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.2.5...3.3.3)

Updates `ts-jest` from 29.1.2 to 29.2.4
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.1.2...v29.2.4)

Updates `typescript` from 5.4.3 to 5.5.4
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.3...v5.5.4)

---
updated-dependencies:
- dependency-name: "@actions/artifact"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@octokit/rest"
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: "@octokit/webhooks-types"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: typed-rest-client
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: eslint-plugin-github
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-06 08:51:50 -06:00
daz
add58192d1 Improve parameter description for 'cache-cleanup' 2024-08-05 10:54:56 -06:00
Daz DeBoer
9edf610422 Update RELEASING.md for v4 2024-08-04 15:14:38 -06:00
daz
b1833c4c90 Account for invalid wrapper jar 2024-08-03 16:51:41 -06:00
daz
895252588e Update docs for v4 release 2024-08-03 16:39:51 -06:00
daz
af1da67850 Prevent concurrent jobs in integ-test-full 2024-08-03 15:54:44 -06:00
daz
f8ba43cf0a Better names for suite workflows 2024-08-03 15:10:49 -06:00
daz
bcd07e6643 Refactor integ-tests into suites
- Extract 2 suites to make it possible to reduce concurrency
- Add separate workflow for integ-test and integ-test-full
2024-08-03 14:56:37 -06:00
daz
d74ee73e9f Refactor integ-tests
- Include test name in all job names
- Remove cache key delegation as it is unused
2024-08-03 14:56:37 -06:00
bigdaz
fb2e6938b6 [bot] Update dist directory 2024-08-02 21:57:19 +00:00
Daz DeBoer
07190022f8 Improve error messages for min-wrapper-count (#321) 2024-08-02 15:56:14 -06:00
daz
ac3aebda93 Improve error messages for min-wrapper-count
- Specific message when no wrappers are found
- Better message when wrapper count is less than configured

Fixes #284
2024-08-02 15:51:41 -06:00
daz
d473db0899 Add tests for wrapper-validation with insufficient wrappers
- Test min-wrapper-count greater than wrappers
- Test caswrapper-validation with insufficient wrappers
2024-08-02 15:50:28 -06:00
94 changed files with 252875 additions and 76249 deletions

View File

@@ -47,40 +47,40 @@ updates:
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
interval: "weekly"
- package-ecosystem: "gradle"
directory: ".github/workflow-samples/groovy-dsl"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
interval: "weekly"
- package-ecosystem: "gradle"
directory: ".github/workflow-samples/java-toolchain"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
interval: "weekly"
- package-ecosystem: "gradle"
directory: ".github/workflow-samples/kotlin-dsl"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
interval: "weekly"
- package-ecosystem: "gradle"
directory: ".github/workflow-samples/no-wrapper"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
interval: "weekly"
- package-ecosystem: "gradle"
directory: ".github/workflow-samples/no-wrapper-gradle-5"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
interval: "weekly"
- package-ecosystem: "gradle"
directory: "sources/test/init-scripts"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
interval: "weekly"

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View File

@@ -1,5 +1,5 @@
plugins {
id "com.gradle.develocity" version "3.17.6"
id "com.gradle.develocity" version "3.18.1"
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.1"
}

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View File

@@ -8,9 +8,9 @@ repositories {
dependencies {
api("org.apache.commons:commons-math3:3.6.1")
implementation("com.google.guava:guava:33.2.1-jre")
implementation("com.google.guava:guava:33.3.1-jre")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.3")
testImplementation("org.junit.jupiter:junit-jupiter:5.11.3")
}
tasks.test {

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View File

@@ -1,5 +1,5 @@
plugins {
id("com.gradle.develocity") version "3.17.6"
id("com.gradle.develocity") version "3.18.1"
id("com.gradle.common-custom-user-data-gradle-plugin") version "2.0.1"
}

View File

@@ -1,5 +1,5 @@
plugins {
id "com.gradle.develocity" version "3.17.6"
id "com.gradle.develocity" version "3.18.1"
}
develocity {

View File

@@ -1,5 +1,5 @@
plugins {
id "com.gradle.develocity" version "3.17.6"
id "com.gradle.develocity" version "3.18.1"
}
develocity {

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View File

@@ -1,5 +1,5 @@
plugins {
id "com.gradle.develocity" version "3.17.6"
id "com.gradle.develocity" version "3.18.1"
}
develocity {

View File

@@ -23,6 +23,12 @@ jobs:
node-version: 20
cache: npm
cache-dependency-path: sources/package-lock.json
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4 # Use a released version to avoid breakages
env:
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
with:
gradle-version: "8.11"
- name: Check formatting and compile
run: |

View File

@@ -21,7 +21,7 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@v45
with:
files: |
dist/**

View File

@@ -26,7 +26,9 @@ jobs:
distribution: temurin
java-version: 11
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 # Use a released version to avoid breakages
uses: gradle/actions/setup-gradle@v4 # Use a released version to avoid breakages
env:
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
- name: Run integration tests
working-directory: sources/test/init-scripts
run: ./gradlew check

View File

@@ -0,0 +1,35 @@
name: CI-integ-test-full
on:
workflow_dispatch:
push:
paths:
- 'dist/**'
permissions:
contents: write
concurrency:
group: integ-test
cancel-in-progress: false
jobs:
caching-integ-tests:
uses: ./.github/workflows/suite-integ-test-caching.yml
concurrency:
group: CI-integ-test-full
cancel-in-progress: false
with:
runner-os: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist: true
secrets: inherit
other-integ-tests:
uses: ./.github/workflows/suite-integ-test-other.yml
concurrency:
group: CI-integ-test-full
cancel-in-progress: false
with:
runner-os: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist: true
secrets: inherit

View File

@@ -8,43 +8,18 @@ on:
- 'main'
- 'release/**'
- 'dev/**' # Allow running tests on dev branches without a PR
paths-ignore:
- 'dist/**'
permissions:
contents: write
concurrency:
group: integ-tests-${{ github.ref }}
group: integ-test
cancel-in-progress: false
jobs:
determine-suite:
runs-on: ubuntu-latest
outputs:
runner-os: ${{ steps.determine-suite.outputs.suite == 'quick' && '["ubuntu-latest"]' || '["ubuntu-latest", "windows-latest", "macos-latest"]' }}
cache-key-prefix: '0' # TODO DAZ Try this again ${{ steps.determine-suite.outputs.suite == 'quick' && '0' || github.run_number }}
suite: ${{ steps.determine-suite.outputs.suite }}
steps:
- name: Determine suite to run
id: determine-suite
run: |
# Always run quick suite if we are not in the core `gradle/actions` repository
# This reduces the load for developers working on 'main' on forks
if [ "${{ github.repository }}" != "gradle/actions" ]; then
echo "Not in core repository: suite=quick"
echo "suite=quick" >> "$GITHUB_OUTPUT"
exit 0
fi
# Run full suite for push trigger with "[bot] Update dist directory" commit message
if [ "${{ github.event.head_commit.message }}" == "[bot] Update dist directory" ]; then
echo "Bot commit to main branch: suite=full"
echo "suite=full" >> "$GITHUB_OUTPUT"
exit 0
fi
# Run quick suite for everything else
echo "Everything else: suite=quick"
echo "suite=quick" >> "$GITHUB_OUTPUT"
build-distribution:
needs: [determine-suite]
runs-on: ubuntu-latest
steps:
- name: Checkout sources
@@ -53,150 +28,16 @@ jobs:
if: ${{ needs.determine-suite.outputs.suite != 'full' }}
uses: ./.github/actions/build-dist
build-scan-publish:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-build-scan-publish.yml
caching-integ-tests:
needs: build-distribution
uses: ./.github/workflows/suite-integ-test-caching.yml
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
skip-dist: false
secrets: inherit
cache-cleanup:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-cache-cleanup.yml
other-integ-tests:
needs: build-distribution
uses: ./.github/workflows/suite-integ-test-other.yml
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.suite}}-${{github.run_number}}-' # Requires a fresh cache entry each run
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
caching-config:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-caching-config.yml
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
dependency-graph:
if: ${{ ! github.event.pull_request.head.repo.fork }}
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-dependency-graph.yml
permissions:
contents: write
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
dependency-submission:
if: ${{ ! github.event.pull_request.head.repo.fork }}
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-dependency-submission.yml
permissions:
contents: write
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
dependency-submission-failures:
if: ${{ ! github.event.pull_request.head.repo.fork }}
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-dependency-submission-failures.yml
permissions:
contents: write
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
develocity-injection:
if: ${{ ! github.event.pull_request.head.repo.fork }}
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-inject-develocity.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
secrets:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
provision-gradle-versions:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-provision-gradle-versions.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
restore-configuration-cache:
if: ${{ ! github.event.pull_request.head.repo.fork }}
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
secrets:
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
restore-containerized-gradle-home:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml
with:
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
restore-custom-gradle-home:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
with:
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
restore-gradle-home:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-restore-gradle-home.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
restore-java-toolchain:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
sample-kotlin-dsl:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
sample-gradle-plugin:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
toolchain-detection:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-detect-java-toolchains.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
wrapper-validation:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-wrapper-validation.yml
with:
runner-os: '["ubuntu-latest"]'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
skip-dist: false
secrets: inherit

View File

@@ -94,3 +94,20 @@ jobs:
- name: Run build
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew assemble
cache-read-only:
needs: build-distribution
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
with:
cache-read-only: true
- name: Build kotlin-dsl project
working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew assemble

View File

@@ -5,9 +5,10 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false

View File

@@ -5,20 +5,23 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: cache-cleanup-${{ inputs.cache-key-prefix }}
# Requires a fresh cache entry each run
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: cache-cleanup-${{ inputs.cache-key-prefix }}-${{github.run_number}}
jobs:
full-build:
cache-cleanup-full-build:
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -38,9 +41,10 @@ jobs:
run: ./gradlew --no-daemon --build-cache -Dcommons_math3_version="3.1" build
# Second build will use the cache from the first build, but cleanup should remove unused artifacts
assemble-build:
needs: full-build
cache-cleanup-assemble-build:
needs: cache-cleanup-full-build
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -60,9 +64,10 @@ jobs:
working-directory: sources/test/jest/resources/cache-cleanup
run: ./gradlew --no-daemon --build-cache -Dcommons_math3_version="3.1.1" build
check-clean-cache:
needs: assemble-build
cache-cleanup-check-clean-cache:
needs: cache-cleanup-assemble-build
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}

View File

@@ -5,9 +5,10 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
@@ -17,8 +18,9 @@ env:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-${{ inputs.cache-key-prefix }}
jobs:
seed-build:
caching-config-seed-build:
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -46,9 +48,10 @@ jobs:
run: ./gradlew test
# Test that the gradle-user-home cache will cache dependencies, by running build with --offline
verify-build:
needs: seed-build
caching-config-verify-build:
needs: caching-config-seed-build
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -75,8 +78,9 @@ jobs:
run: ./gradlew test --offline
# Test that build scans are captured when caching is explicitly disabled
cache-disabled:
caching-config-cache-disabled:
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -103,7 +107,7 @@ jobs:
core.setFailed('No Build Scan detected')
# Test that build scans are captured when caching is disabled because Gradle User Home already exists
cache-disabled-pre-existing-gradle-home:
caching-config-cache-disabled-pre-existing-gradle-home:
runs-on: ubuntu-latest # This test only runs on Ubuntu
steps:
- name: Checkout sources
@@ -127,10 +131,11 @@ jobs:
core.setFailed('No Build Scan detected')
# Test seed the cache with cache-write-only and verify with cache-read-only
seed-build-write-only:
caching-config-seed-write-only:
env:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-write-only-
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-write-only-${{ inputs.cache-key-prefix }}
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -149,11 +154,12 @@ jobs:
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test
verify-write-only-build:
caching-config-verify-write-only:
env:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-write-only-
needs: seed-build-write-only
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-write-only-${{ inputs.cache-key-prefix }}
needs: caching-config-seed-write-only
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}

View File

@@ -5,9 +5,10 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
@@ -21,12 +22,8 @@ env:
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
jobs:
groovy-upload:
strategy:
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }}
dependency-graph-groovy-upload:
runs-on: "ubuntu-latest"
steps:
- name: Checkout sources
uses: actions/checkout@v4
@@ -41,8 +38,8 @@ jobs:
run: ./gradlew build
working-directory: .github/workflow-samples/groovy-dsl
groovy-submit:
needs: [groovy-upload]
dependency-graph-groovy-submit:
needs: [dependency-graph-groovy-upload]
runs-on: "ubuntu-latest"
steps:
- name: Checkout sources
@@ -57,12 +54,8 @@ jobs:
env:
DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-upload
kotlin-generate-and-submit:
strategy:
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }}
dependency-graph-kotlin-generate-and-submit:
runs-on: "ubuntu-latest"
steps:
- name: Checkout sources
uses: actions/checkout@v4
@@ -77,12 +70,8 @@ jobs:
run: ./gradlew build
working-directory: .github/workflow-samples/kotlin-dsl
multiple-builds:
strategy:
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
runs-on: ${{ matrix.os }}
dependency-graph-multiple-builds:
runs-on: "ubuntu-latest"
steps:
- name: Checkout sources
uses: actions/checkout@v4
@@ -122,7 +111,7 @@ jobs:
exit 1
fi
config-cache:
dependency-graph-config-cache:
runs-on: ubuntu-latest # Test is not compatible with Windows
steps:
- name: Checkout sources

View File

@@ -5,6 +5,7 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
runner-os:
type: string
default: '["ubuntu-latest"]'
@@ -18,7 +19,7 @@ env:
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
jobs:
failing-build:
dependency-submission-failures-failing-build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
@@ -47,7 +48,7 @@ jobs:
exit 1
fi
unsupported-gradle-version:
dependency-submission-failures-unsupported-gradle-version:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
@@ -76,7 +77,7 @@ jobs:
exit 1
fi
insufficient-permissions:
dependency-submission-failures-insufficient-permissions:
runs-on: ubuntu-latest
permissions:
contents: read

View File

@@ -5,9 +5,10 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
@@ -21,8 +22,9 @@ env:
GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
jobs:
groovy-generate-and-upload:
dependency-submission-groovy-generate-and-upload:
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -42,9 +44,10 @@ jobs:
env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission
groovy-restore-cache:
needs: [groovy-generate-and-upload]
dependency-submission-groovy-restore-cache:
needs: [dependency-submission-groovy-generate-and-upload]
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -63,9 +66,10 @@ jobs:
env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: groovy-dependency-submission
groovy-download-and-submit:
needs: [groovy-generate-and-upload]
dependency-submission-groovy-download-and-submit:
needs: [dependency-submission-groovy-generate-and-upload]
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -83,8 +87,9 @@ jobs:
env:
DEPENDENCY_GRAPH_DOWNLOAD_ARTIFACT_NAME: groovy-generate-and-upload-${{ matrix.os }}
kotlin-generate-and-submit:
dependency-submission-kotlin-generate-and-submit:
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -100,8 +105,9 @@ jobs:
with:
build-root-directory: .github/workflow-samples/kotlin-dsl
multiple-builds:
dependency-submission-multiple-builds:
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -145,8 +151,9 @@ jobs:
exit 1
fi
multiple-builds-upload:
dependency-submission-multiple-builds-upload:
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -168,7 +175,7 @@ jobs:
dependency-graph: generate-and-upload
build-root-directory: .github/workflow-samples/groovy-dsl
config-cache:
dependency-submission-config-cache:
runs-on: ubuntu-latest # Test is not compatible with Windows
steps:
- name: Checkout sources
@@ -203,7 +210,7 @@ jobs:
exit 1
fi
gradle-versions:
dependency-submission-gradle-versions:
strategy:
fail-fast: false
matrix:
@@ -227,7 +234,7 @@ jobs:
gradle-version: ${{ matrix.gradle }}
build-root-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
with-setup-gradle:
dependency-submission-with-setup-gradle:
runs-on: ubuntu-latest # Test is not compatible with Windows
steps:
- name: Checkout sources
@@ -262,7 +269,7 @@ jobs:
exit 1
fi
with-includes-and-excludes:
dependency-submission-with-includes-and-excludes:
runs-on: ubuntu-latest # Test is not compatible with Windows
steps:
- name: Checkout sources
@@ -296,8 +303,9 @@ jobs:
fi
custom-report-dir-submit:
dependency-submission-custom-report-dir-submit:
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -330,7 +338,7 @@ jobs:
exit 1
fi
custom-report-dir-upload:
dependency-submission-custom-report-dir-upload:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
@@ -347,7 +355,7 @@ jobs:
build-root-directory: .github/workflow-samples/groovy-dsl
custom-report-dir-download-and-submit:
needs: custom-report-dir-upload
needs: [dependency-submission-custom-report-dir-upload]
runs-on: ubuntu-latest
steps:
- name: Checkout sources

View File

@@ -5,9 +5,10 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
@@ -18,7 +19,7 @@ env:
jobs:
# Test that pre-installed runner JDKs are detected
pre-installed-toolchains:
detect-toolchains-pre-installed-jdks:
strategy:
fail-fast: false
matrix:
@@ -48,7 +49,7 @@ jobs:
grep -q 'Eclipse Temurin JDK 21' output.txt || (echo "::error::Did not detect preinstalled JDK 21" && exit 1)
# Test that JDKs provisioned by setup-java are detected
setup-java-installed-toolchain:
detect-toolchains-setup-java-jdks:
strategy:
fail-fast: false
matrix:

View File

@@ -5,9 +5,10 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
@@ -32,11 +33,11 @@ jobs:
matrix:
gradle: [current, 7.6.2, 6.9.4, 5.6.4]
os: ${{fromJSON(inputs.runner-os)}}
plugin-version: [3.16.2, 3.17.6]
plugin-version: [3.16.2, 3.18.1]
include:
- plugin-version: 3.16.2
accessKeyEnv: GRADLE_ENTERPRISE_ACCESS_KEY
- plugin-version: 3.17.6
- plugin-version: 3.18.1
accessKeyEnv: DEVELOCITY_ACCESS_KEY
runs-on: ${{ matrix.os }}
@@ -83,7 +84,7 @@ jobs:
matrix:
gradle: [current, 7.6.2, 6.9.4, 5.6.4]
os: ${{fromJSON(inputs.runner-os)}}
plugin-version: [3.16.2, 3.17.6]
plugin-version: [3.16.2, 3.18.1]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
@@ -132,7 +133,7 @@ jobs:
matrix:
gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ]
os: ${{fromJSON(inputs.runner-os)}}
plugin-version: [ 3.16.2, 3.17.6 ]
plugin-version: [ 3.16.2, 3.18.1 ]
runs-on: ubuntu-latest
steps:
- name: Checkout sources
@@ -168,7 +169,7 @@ jobs:
matrix:
gradle: [ current, 7.6.2, 6.9.4, 5.6.4 ]
os: ${{fromJSON(inputs.runner-os)}}
plugin-version: [ 3.16.2, 3.17.6 ]
plugin-version: [ 3.16.2, 3.18.1 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources

View File

@@ -5,9 +5,10 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
@@ -22,6 +23,7 @@ jobs:
# Each build verifies that it is executed with the expected Gradle version.
provision-gradle:
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -69,11 +71,11 @@ jobs:
script: |
core.setFailed('Gradle version parameter not set correctly: value was "${{ steps.gradle-current.outputs.gradle-version }}"')
gradle-versions:
provision-gradle-version:
strategy:
fail-fast: false
matrix:
gradle: [8.9, 8.8, 7.6.4, 6.9.4, 5.6.4, 4.10.3, 3.5.1] # 8.8 is the latest installed on windows runners
gradle: ["8.10", 8.9, 8.1, 7.6.4, 6.9.4, 5.6.4, 4.10.3, 3.5.1]
os: ${{fromJSON(inputs.runner-os)}}
include:
- java-version: 11

View File

@@ -5,9 +5,10 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
@@ -20,10 +21,11 @@ env:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-configuration-cache-${{ inputs.cache-key-prefix }}
jobs:
seed-build-groovy:
restore-cc-seed-build-groovy:
env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -50,12 +52,13 @@ jobs:
working-directory: .github/workflow-samples/groovy-dsl
run: gradle test --configuration-cache
verify-build-groovy:
restore-cc-verify-build-groovy:
env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1
needs: seed-build-groovy
needs: restore-cc-seed-build-groovy
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -91,12 +94,13 @@ jobs:
fi
# Ensure that cache-cleanup doesn't remove all necessary files
verify-no-cache-cleanup-groovy:
restore-cc-verify-no-cache-cleanup-groovy:
env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2
needs: verify-build-groovy
needs: restore-cc-verify-build-groovy
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -131,12 +135,13 @@ jobs:
fi
# Check that the build can run when no extracted cache entries are restored
gradle-user-home-not-fully-restored:
restore-cc-gradle-user-home-not-fully-restored:
env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-groovy
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_x
needs: seed-build-groovy
needs: restore-cc-seed-build-groovy
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -164,10 +169,11 @@ jobs:
working-directory: .github/workflow-samples/groovy-dsl
run: gradle test --configuration-cache
seed-build-kotlin:
restore-cc-seed-build-kotlin:
env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -194,12 +200,13 @@ jobs:
working-directory: .github/workflow-samples/kotlin-dsl
run: gradle help --configuration-cache
modify-build-kotlin:
restore-cc-modify-build-kotlin:
env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_1
needs: seed-build-kotlin
needs: restore-cc-seed-build-kotlin
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -226,12 +233,13 @@ jobs:
run: gradle test --configuration-cache
# Test restore configuration-cache from the third build invocation
verify-build-kotlin:
restore-cc-verify-build-kotlin:
env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-cc-kotlin
GRADLE_BUILD_ACTION_CACHE_KEY_JOB_EXECUTION: ${{github.sha}}_2
needs: modify-build-kotlin
needs: restore-cc-modify-build-kotlin
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}

View File

@@ -5,6 +5,7 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
skip-dist:
type: boolean
default: false
@@ -14,7 +15,7 @@ env:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-containerized-gradle-home-${{ inputs.cache-key-prefix }}
jobs:
seed-build:
restore-containerized-seed-build:
runs-on: ubuntu-latest
container: fedora:latest
steps:
@@ -32,8 +33,8 @@ jobs:
run: ./gradlew test
# Test that the gradle-user-home cache will cache dependencies, by running build with --offline
dependencies-cache:
needs: seed-build
restore-containerized-dependencies-cache:
needs: restore-containerized-seed-build
runs-on: ubuntu-latest
container: fedora:latest
steps:

View File

@@ -5,6 +5,7 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
skip-dist:
type: boolean
default: false
@@ -14,7 +15,7 @@ env:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }}
jobs:
seed-build:
restore-custom-gradle-home-seed-build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
@@ -35,8 +36,8 @@ jobs:
run: ./gradlew test --info
# Test that the gradle-user-home cache will cache dependencies, by running build with --offline
dependencies-cache:
needs: seed-build
restore-custom-gradle-home-dependencies-cache:
needs: restore-custom-gradle-home-seed-build
runs-on: ubuntu-latest
steps:
- name: Checkout sources
@@ -57,8 +58,8 @@ jobs:
run: ./gradlew test --offline --info
# Test that the gradle-user-home cache will cache and restore local build-cache
build-cache:
needs: seed-build
restore-custom-gradle-home-build-cache:
needs: restore-custom-gradle-home-seed-build
runs-on: ubuntu-latest
steps:
- name: Checkout sources

View File

@@ -5,9 +5,10 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
@@ -18,8 +19,9 @@ env:
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-gradle-home
jobs:
seed-build:
restore-gradle-home-seed-build:
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -39,9 +41,10 @@ jobs:
run: ./gradlew test
# Test that the gradle-user-home cache will cache dependencies, by running build with --offline
dependencies-cache:
needs: seed-build
restore-gradle-home-dependencies-cache:
needs: restore-gradle-home-seed-build
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -61,9 +64,10 @@ jobs:
run: ./gradlew test --offline
# Test that the gradle-user-home cache will cache and restore local build-cache
build-cache:
needs: seed-build
restore-gradle-home-build-cache:
needs: restore-gradle-home-seed-build
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -83,9 +87,10 @@ jobs:
run: ./gradlew test -DverifyCachedBuild=true
# Check that the build can run when Gradle User Home is not fully restored
no-extracted-cache-entries-restored:
needs: seed-build
restore-gradle-home-no-extracted-cache-entries-restored:
needs: restore-gradle-home-seed-build
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -107,9 +112,10 @@ jobs:
run: ./gradlew test
# Test that a pre-existing gradle-user-home can be overwritten by the restored cache
pre-existing-gradle-home:
needs: seed-build
restore-gradle-home-pre-existing-gradle-home:
needs: restore-gradle-home-seed-build
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}

View File

@@ -5,9 +5,10 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
@@ -17,8 +18,9 @@ env:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-java-toolchain-${{ inputs.cache-key-prefix }}
jobs:
seed-build:
restore-java-toolchain-seed-build:
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -38,9 +40,10 @@ jobs:
run: ./gradlew test --info
# Test that the gradle-user-home cache will cache the toolchain, by running build with --offline
toolchain-cache:
needs: seed-build
restore-java-toolchain-verify-build:
needs: restore-java-toolchain-seed-build
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}

View File

@@ -5,9 +5,10 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
@@ -17,8 +18,9 @@ env:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-gradle-plugin-${{ inputs.cache-key-prefix }}
jobs:
seed-build:
sample-gradle-plugin-seed-build:
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -37,9 +39,10 @@ jobs:
working-directory: .github/workflow-samples/gradle-plugin
run: ./gradlew build
verify-build:
needs: seed-build
sample-gradle-plugin-verify-build:
needs: sample-gradle-plugin-seed-build
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}

View File

@@ -5,9 +5,10 @@ on:
inputs:
cache-key-prefix:
type: string
default: '0'
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
@@ -17,8 +18,9 @@ env:
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-kotlin-dsl-${{ inputs.cache-key-prefix }}
jobs:
seed-build:
sample-kotlin-dsl-seed-build:
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}
@@ -37,9 +39,10 @@ jobs:
working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew build
verify-build:
needs: seed-build
sample-kotlin-dsl-verify-build:
needs: sample-kotlin-dsl-seed-build
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: ${{fromJSON(inputs.runner-os)}}

View File

@@ -5,7 +5,7 @@ on:
inputs:
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
@@ -14,7 +14,7 @@ env:
SKIP_DIST: ${{ inputs.skip-dist }}
jobs:
test-setup-gradle-validation:
wrapper-validation-setup-gradle:
strategy:
fail-fast: false
matrix:
@@ -34,13 +34,14 @@ jobs:
continue-on-error: true
- name: Check failure
shell: bash
run: |
if [ "${{ steps.setup-gradle.outcome}}" != "failure" ] ; then
echo "Expected validation to fail, but it didn't"
exit 1
fi
test-validation-success:
wrapper-validation-success:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
@@ -54,6 +55,7 @@ jobs:
with:
# to allow the invalid wrapper jar present in test data
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
min-wrapper-count: 10
- name: Check outcome
env:
@@ -61,13 +63,14 @@ jobs:
# below to not accidentally inject code into shell script or break its syntax
FAILED_WRAPPERS: ${{ steps.action-test.outputs.failed-wrapper }}
FAILED_WRAPPERS_MATCHES: ${{ steps.action-test.outputs.failed-wrapper == '' }}
shell: bash
run: |
if [ "$FAILED_WRAPPERS_MATCHES" != "true" ] ; then
echo "'outputs.failed-wrapper' has unexpected content: $FAILED_WRAPPERS"
exit 1
fi
test-validation-error:
wrapper-validation-error:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
@@ -88,6 +91,7 @@ jobs:
VALIDATION_FAILED: ${{ steps.action-test.outcome == 'failure' }}
FAILED_WRAPPERS: ${{ steps.action-test.outputs.failed-wrapper }}
FAILED_WRAPPERS_MATCHES: ${{ steps.action-test.outputs.failed-wrapper == 'sources/test/jest/wrapper-validation/data/invalid/gradle-wrapper.jar|sources/test/jest/wrapper-validation/data/invalid/gradlе-wrapper.jar' }}
shell: bash
run: |
if [ "$VALIDATION_FAILED" != "true" ] ; then
echo "Expected validation to fail, but it didn't"
@@ -98,3 +102,64 @@ jobs:
echo "'outputs.failed-wrapper' has unexpected content: $FAILED_WRAPPERS"
exit 1
fi
wrapper-validation-minimum-wrapper-count:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Run wrapper-validation-action
id: action-test
uses: ./wrapper-validation
with:
# to allow the invalid wrapper jar present in test data
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
min-wrapper-count: 11
# Expected to fail; validated below
continue-on-error: true
- name: Check outcome
env:
# Evaluate workflow expressions here as env variable values instead of inside shell script
# below to not accidentally inject code into shell script or break its syntax
VALIDATION_FAILED: ${{ steps.action-test.outcome == 'failure' }}
shell: bash
run: |
if [ "$VALIDATION_FAILED" != "true" ] ; then
echo "Expected validation to fail, but it didn't"
exit 1
fi
wrapper-validation-zero-wrappers:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4 # Checkout the repository with no wrappers
with:
sparse-checkout: |
.github/actions
dist
wrapper-validation
- name: Initialize integ-test
uses: ./.github/actions/init-integ-test
- name: Run wrapper-validation-action
id: action-test
uses: ./wrapper-validation
# Expected to fail; validated below
continue-on-error: true
- name: Check outcome
env:
# Evaluate workflow expressions here as env variable values instead of inside shell script
# below to not accidentally inject code into shell script or break its syntax
VALIDATION_FAILED: ${{ steps.action-test.outcome == 'failure' }}
shell: bash
run: |
if [ "$VALIDATION_FAILED" != "true" ] ; then
echo "Expected validation to fail, but it didn't"
exit 1
fi

View File

@@ -0,0 +1,52 @@
name: suite-integ-test-caching
on:
workflow_call:
inputs:
runner-os:
type: string
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
jobs:
cache-cleanup:
uses: ./.github/workflows/integ-test-cache-cleanup.yml
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
caching-config:
uses: ./.github/workflows/integ-test-caching-config.yml
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
restore-configuration-cache:
if: ${{ ! github.event.pull_request.head.repo.fork }}
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
with:
skip-dist: ${{ inputs.skip-dist }}
secrets:
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
restore-containerized-gradle-home:
uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml
with:
skip-dist: ${{ inputs.skip-dist }}
restore-custom-gradle-home:
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
with:
skip-dist: ${{ inputs.skip-dist }}
restore-gradle-home:
uses: ./.github/workflows/integ-test-restore-gradle-home.yml
with:
skip-dist: ${{ inputs.skip-dist }}
restore-java-toolchain:
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
with:
skip-dist: ${{ inputs.skip-dist }}

View File

@@ -0,0 +1,82 @@
name: suite-integ-test-other
on:
workflow_call:
inputs:
runner-os:
type: string
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false
jobs:
build-scan-publish:
uses: ./.github/workflows/integ-test-build-scan-publish.yml
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
dependency-graph:
if: ${{ ! github.event.pull_request.head.repo.fork }}
uses: ./.github/workflows/integ-test-dependency-graph.yml
permissions:
contents: write
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
dependency-submission:
if: ${{ ! github.event.pull_request.head.repo.fork }}
uses: ./.github/workflows/integ-test-dependency-submission.yml
permissions:
contents: write
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
dependency-submission-failures:
if: ${{ ! github.event.pull_request.head.repo.fork }}
uses: ./.github/workflows/integ-test-dependency-submission-failures.yml
permissions:
contents: write
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
develocity-injection:
if: ${{ ! github.event.pull_request.head.repo.fork }}
uses: ./.github/workflows/integ-test-inject-develocity.yml
with:
skip-dist: ${{ inputs.skip-dist }}
secrets:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
provision-gradle-versions:
uses: ./.github/workflows/integ-test-provision-gradle-versions.yml
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
sample-kotlin-dsl:
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
sample-gradle-plugin:
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}
toolchain-detection:
uses: ./.github/workflows/integ-test-detect-toolchains.yml
with:
skip-dist: ${{ inputs.skip-dist }}
wrapper-validation:
uses: ./.github/workflows/integ-test-wrapper-validation.yml
with:
runner-os: '${{ inputs.runner-os }}'
skip-dist: ${{ inputs.skip-dist }}

View File

@@ -37,7 +37,7 @@ jobs:
# If there are no changes, this action will not create a pull request
- name: Create or update pull request
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
branch: bot/wrapper-checksums-update
commit-message: Update known wrapper checksums

View File

@@ -30,7 +30,7 @@ jobs:
distribution: 'temurin'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew build
```
@@ -68,7 +68,7 @@ jobs:
distribution: 'temurin'
java-version: 17
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
```
See the [full action documentation](docs/dependency-submission.md) for more advanced usage scenarios.
@@ -79,6 +79,9 @@ The `wrapper-validation` action validates the checksums of _all_ [Gradle Wrapper
The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`.
Starting with v4 the `setup-gradle` action will [perform wrapper validation](docs/setup-gradle.md#gradle-wrapper-validation) on each execution.
If you are using `setup-gradle` in your workflows, it is unlikely that you will need to use the `wrapper-validation` action.
### Example workflow
```yaml
@@ -94,7 +97,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3
- uses: gradle/actions/wrapper-validation@v4
```
See the [full action documentation](docs/wrapper-validation.md) for more advanced usage scenarios.

View File

@@ -5,58 +5,27 @@
- Check that https://github.com/gradle/actions/actions is green for all workflows for the main branch.
- This should include any workflows triggered by `[bot] Update dist directory`
- Decide on the version number to use for the release. The action releases should follow semantic versioning.
- By default, a patch release is assumed (eg. `3.0.0``3.0.1`)
- If new features have been added, bump the minor version (eg `3.1.1``3.2.0`)
- If a new major release is required, bump the major version (eg `3.1.1``4.0.0`)
- By default, a patch release is assumed (eg. `4.0.0``4.0.1`)
- If new features have been added, bump the minor version (eg `4.1.1``4.2.0`)
- If a new major release is required, bump the major version (eg `4.1.1``5.0.0`)
- Note: The gradle actions follow the GitHub Actions convention of including a .0 patch number for the first release of a minor version, unlike the Gradle convention which omits the trailing .0.
## Release gradle/actions
- Create a tag for the release. The tag should have the format `v3.1.0`
- From CLI: `git tag v3.1.0 && git push --tags`
- Create a tag for the release. The tag should have the format `v4.1.0`
- From CLI: `git tag v4.1.0 && git push --tags`
- Go to https://github.com/gradle/actions/releases and "Draft new release"
- Use the newly created tag and copy the tag name exactly as the release title.
- Craft release notes content based on issues closed, PRs merged and commits
- Include a Full changelog link in the format https://github.com/gradle/actions/compare/v2.12.0...v3.0.0
- Publish the release.
- Force push the `v3` tag (or current major version) to point to the new release. It is conventional for users to bind to a major release version using this tag.
- From CLI: `git tag -f -a -m "v3.0.0" v3 v3.0.0 && git push -f --tags`
- Force push the `v4` tag (or current major version) to point to the new release. It is conventional for users to bind to a major release version using this tag.
- From CLI: `git tag -f -a -m "v4.0.0" v4 v4.0.0 && git push -f --tags`
- Note that we set the commit message for the tag to the newly released version.
## Release gradle/gradle-build-action
During the 3.x release series, we will continue to publish parallel releases of `gradle/gradle-build-action`. These releases will simply delegate to `gradle/actions/setup-gradle` with the same version.
- Update the [gradle-build-action action.yml](https://github.com/gradle/gradle-build-action/blob/main/action.yml#L162) file to point to the newly released version of `gradle/actions/setup-gradle`.
- Ensure that any parameters that have been added to the setup-gradle action are added to the gradle-build-action definition, and that these are passed on to setup-gradle.
- Create and push a tag for the release.
- From CLI: `git tag v3.1.0 && git push --tags`
- Go to https://github.com/gradle/gradle-build-action/releases and "Draft new release"
- Use the newly created tag and copy the tag name exactly as the release title.
- In the release notes, point users to the gradle/actions release. Include a header informing users to switch to `gradle/actions/setup-gradle`.
- Publish the release.
- Force push the `v3` tag (or current major version) to point to the new release.
- From CLI: `git tag -f -a -m "v3.0.0" v3 v3.0.0 && git push -f --tags`
## Release gradle/wrapper-validation-action
During the 3.x release series, we will continue to publish parallel releases of `gradle/wrapper-validation-action`. These releases will simply delegate to `gradle/actions/wrapper-validation` with the same version.
- Update the [wrapper-validation-action action.yml](https://github.com/gradle/wrapper-validation-action/blob/main/action.yml#L162) file to point to the newly released version of `gradle/actions/wrapper-validation`.
- Ensure that any parameters that have been added to the `wrapper-validation` action (if any) are added to the action definition, and that these are passed on to setup-gradle.
- Create and push a tag for the release.
- From CLI: `git tag v3.1.0 && git push --tags`
- Go to https://github.com/gradle/wrapper-validation-action/releases and "Draft new release"
- Use the newly created tag and copy the tag name exactly as the release title.
- In the release notes, point users to the gradle/actions release. Include a header informing users to switch to `gradle/actions/wrapper-validation`.
- Publish the release.
- Force push the `v3` tag (or current major version) to point to the new release.
- From CLI: `git tag -f -a -m "v3.0.0" v3 v3.0.0 && git push -f --tags`
## Post release steps
Submit PRs to update the GitHub starter workflow. Starter workflows contain content that should reference the Git hash of the current gradle/actions release:
https://github.com/actions/starter-workflows has [gradle](https://github.com/actions/starter-workflows/blob/main/ci/gradle.yml) and [gradle-publish](https://github.com/actions/starter-workflows/blob/main/ci/gradle-publish.yml): see [the v2.1.4 update PR](https://github.com/actions/starter-workflows/pull/1489) for an example.
https://github.com/actions/starter-workflows has [gradle](https://github.com/actions/starter-workflows/blob/main/ci/gradle.yml) and [gradle-publish](https://github.com/actions/starter-workflows/blob/main/ci/gradle-publish.yml): see [the v4.0.0 update PR](https://github.com/actions/starter-workflows/pull/2468) for an example.
Submit PRs to update the GitHub documentation. The documentation contains content that should reference the Git hash of the current gradle/actions release:
https://github.com/github/docs has [building-and-testing-java-with-gradle](https://github.com/github/docs/blob/main/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md) and [publishing-java-packages-with-gradle](https://github.com/github/docs/blob/main/content/actions/publishing-packages/publishing-java-packages-with-gradle.md) : see [the v2.1.4 update PR](https://github.com/github/docs/pull/16392) for an example.
https://github.com/github/docs has [building-and-testing-java-with-gradle](https://github.com/github/docs/blob/main/content/actions/automating-builds-and-tests/building-and-testing-java-with-gradle.md) and [publishing-java-packages-with-gradle](https://github.com/github/docs/blob/main/content/actions/publishing-packages/publishing-java-packages-with-gradle.md) : see [the v4.0.0 update PR](https://github.com/github/docs/pull/34239) for an example.

View File

@@ -29,7 +29,7 @@ jobs:
distribution: 'temurin'
java-version: 17
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
```
See the [full action documentation](../docs/dependency-submission.md) for more advanced usage scenarios.

View File

@@ -60,7 +60,8 @@ inputs:
cache-cleanup:
description: |
Specifies if the action should attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache.
By default, no cleanup is performed. It can be configured to run every time, or only when all Gradle builds succeed for the Job.
By default ('on-success'), cleanup is performed when all Gradle builds succeed for the Job.
This behaviour can be disabled ('never'), or configured to always run irrespective of the build outcome ('always').
Valid values are 'never', 'on-success' and 'always'.
required: false
default: 'on-success'

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -43,7 +43,7 @@ jobs:
java-version: 17
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
```
### Gradle execution
@@ -68,7 +68,7 @@ Three input parameters are required, one to enable publishing and two more to ac
```yaml
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
@@ -83,7 +83,7 @@ In some cases, the default action configuration will not be sufficient, and addi
```yaml
- name: Generate and save dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
with:
# Use a particular Gradle version instead of the configured wrapper.
gradle-version: 8.6
@@ -273,7 +273,7 @@ For example, if you want to exclude dependencies resolved by the `buildSrc` proj
```yaml
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
with:
# Exclude all dependencies that originate solely in the 'buildSrc' project
dependency-graph-exclude-projets: ':buildSrc'
@@ -317,10 +317,10 @@ jobs:
java-version: 17
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
- name: Perform dependency review
uses: actions/dependency-review-action@v3
uses: actions/dependency-review-action@v4
```
## Usage with pull requests from public forked repositories
@@ -353,7 +353,7 @@ jobs:
java-version: 17
- name: Generate and save dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
with:
dependency-graph: generate-and-upload
```
@@ -376,7 +376,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download and submit dependency graph
uses: gradle/actions/dependency-submission@v3
uses: gradle/actions/dependency-submission@v4
with:
dependency-graph: download-and-submit # Download saved dependency-graph and submit
```
@@ -403,7 +403,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3
uses: actions/dependency-review-action@v4
with:
retry-on-snapshot-warnings: true
retry-on-snapshot-warnings-timeout: 600

View File

@@ -20,7 +20,7 @@ To convert your workflows, simply replace:
```
with
```
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
```
## The action `gradle/wrapper-validation-action` has been replaced by `gradle/actions/wrapper-validation`
@@ -40,7 +40,7 @@ To convert your workflows, simply replace:
```
with
```
uses: gradle/actions/wrapper-validation@v3
uses: gradle/actions/wrapper-validation@v4
```
## Using the action to execute Gradle via the `arguments` parameter is deprecated
@@ -82,7 +82,7 @@ The exact syntax depends on whether or not your project is configured with the [
```
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Assemble the project
run: ./gradlew assemble
@@ -99,9 +99,9 @@ The exact syntax depends on whether or not your project is configured with the [
```
- name: Setup Gradle for a non-wrapper project
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: 8.9
gradle-version: "8.10"
- name: Assemble the project
run: gradle assemble

View File

@@ -45,7 +45,7 @@ jobs:
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Execute Gradle build
run: ./gradlew build
@@ -57,11 +57,11 @@ The `setup-gradle` action can download and install a specified Gradle version, a
Downloaded Gradle versions are stored in the GitHub Actions cache, to avoid having to download them again later.
```yaml
- name: Setup Gradle 8.5
uses: gradle/actions/setup-gradle@v3
- name: Setup Gradle 8.10
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: 8.5
- name: Build with Gradle 8.5
gradle-version: "8.10" # Quotes required to prevent YAML converting to number
- name: Build with Gradle 8.10
run: gradle build
```
@@ -96,7 +96,7 @@ jobs:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v3
- uses: gradle/actions/setup-gradle@v4
id: setup-gradle
with:
gradle-version: release-candidate
@@ -213,7 +213,7 @@ jobs:
distribution: temurin
java-version: 17
- uses: gradle/actions/setup-gradle@v3
- uses: gradle/actions/setup-gradle@v4
with:
gradle-version: 8.6
cache-encryption-key: ${{ secrets.GradleEncryptionKey }}
@@ -455,7 +455,7 @@ jobs:
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
add-job-summary-as-pr-comment: on-failure # Valid values are 'never' (default), 'always', and 'on-failure'
@@ -492,17 +492,17 @@ jobs:
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Run build with Gradle wrapper
run: ./gradlew build --scan
- name: Upload build reports
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: build-reports
path: build/reports/
path: **/build/reports/
```
### Use of custom init-scripts in Gradle User Home
@@ -523,7 +523,7 @@ If you do not want wrapper-validation to occur automatically, you can disable it
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
validate-wrappers: false
```
@@ -535,7 +535,7 @@ These are not allowed by default.
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
validate-wrappers: true
allow-snapshot-wrappers: true
@@ -600,7 +600,7 @@ jobs:
java-version: 17
- name: Setup Gradle to generate and submit dependency graphs
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
dependency-graph: generate-and-submit
- name: Run the usual CI build (dependency-graph will be generated and submitted post-job)
@@ -627,7 +627,7 @@ graph cannot be generated or submitted. You can enable this behavior with the `d
```yaml
# Ensure that the workflow Job will fail if the dependency graph cannot be submitted
- uses: gradle/actions/setup-gradle@v3
- uses: gradle/actions/setup-gradle@v4
with:
dependency-graph: generate-and-submit
dependency-graph-continue-on-failure: false
@@ -652,7 +652,7 @@ jobs:
java-version: 17
- name: Setup Gradle to generate and submit dependency graphs
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
dependency-graph: generate-and-submit
- name: Run a build, resolving the 'dependency-graph' plugin from the plugin portal proxy
@@ -682,7 +682,7 @@ jobs:
java-version: 17
- name: Setup Gradle to generate and submit dependency graphs
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
dependency-graph: generate-and-submit
- name: Build the app, generating a graph of dependencies required
@@ -718,20 +718,112 @@ To reduce storage costs for these artifacts, you can set the `artifact-retention
```yaml
- name: Generate dependency graph, but only retain artifact for one day
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
dependency-graph: generate
artifact-retention-days: 1
```
# Develocity plugin injection
# Develocity Build Scan® integration
The `setup-gradle` action provides support for injecting and configuring the Develocity Gradle plugin into any Gradle build, without any modification to the project sources.
This is achieved via an init-script installed into Gradle User Home, which is enabled and parameterized via environment variables.
Publishing a Develocity Build Scan can be very helpful for Gradle builds run on GitHub Actions. Each Build Scan provides a
detailed report of the execution of the build, including which tasks were executed and the results of any test execution.
The `setup-gradle` plugin provides a number of features to enable and enhance publishing Build Scans® to a Develocity instance.
## Publishing to scans.gradle.com
If you don't have a a private Develocity instance, you can easily publish Build Scans to the
free, public Develocity instance (https://scans.gradle.com).
To publish to https://scans.gradle.com, you must specify in your workflow that you accept the [Gradle Terms of Use](https://gradle.com/help/legal-terms-of-use).
```yaml
- name: Setup Gradle to publish build scans
uses: gradle/actions/setup-gradle@v4
with:
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 a Gradle build - a build scan will be published automatically
run: ./gradlew build
```
## Managing Develocity access keys
Develocity access keys are long-lived, creating risks if they are leaked. To mitigate this risk this,
the `setup-gradle` action can automatically attempt to obtain a [short-lived access token](https://docs.gradle.com/develocity/gradle-plugin/current/#short_lived_access_tokens)
to use when authenticating with Develocity.
The short-lived access token will then be used wherever a Develocity access key is required.
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }} # Long-lived access key, visiblility is restricted to this step.
# Subsequent steps will automatically use a short-lived access token to authenticate with Develocity
- name: Run a Gradle build that is configured to publish to Develocity.
run: ./gradlew build
```
### Increasing the expiry time for Develocity access tokens
By default, a short-lived Develocity access token will be valid for 2 hours from the time it is generated. If your workflows take longer than
2 hours to complete, you may see failure to publish Build Scans due to access token expiry.
To avoid this, use the `develocity-token-expiry` parameter to specify a different token expiry in hours.
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
develocity-token-expiry: 8 # The number of hours that the access token should remain valid (max 24).
```
### Develocity access key supplied as environment variable
The preferred mechanism is to supply the long-lived Develocity access key directly to `setup-gradle` via
the `develocity-access-key` input variable. However, the action will also detect an access key configured as an environment variable,
such as `DEVELOCITY_ACCESS_KEY` or `GRADLE_ENTERPRISE_ACCESS_KEY`. In this case, the environment variable value will be replaced by
a short-lived access token, thus hiding the long-lived access key from subsequent steps.
```yaml
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
jobs:
build-with-gradle:
runs-on: ubuntu-latest
steps:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
# The build will automatically use a short-lived access token to authenticate with Develocity
- name: Run a Gradle build that is configured to publish to Develocity.
run: ./gradlew build
```
### Failure to obtain a short-lived access token
If a short-lived token cannot be retrieved (for example, if the Develocity server version is lower than `2024.1`):
- If the access key is provided via `develocity-access-key`, then no access token is set and authentication with Develocity will not succeed.
- If the access key is provided via an environment variable, a warning will be logged and the environment variable will be left as-is.
This can result in long-lived access keys being unintentionally exposed to other workflow steps.
For more information on short-lived tokens, see [Develocity API documentation](https://docs.gradle.com/develocity/api-manual/#short_lived_access_tokens).
## Develocity plugin injection
The `setup-gradle` action provides support for transparently injecting and configuring the Develocity Gradle plugin into any Gradle build,
without any modification to the project sources. This allows Build Scans to be published for a repository without any changes to the project sources.
Develocity injection is achieved via an init-script installed into Gradle User Home, which is enabled and parameterized via environment variables.
The same auto-injection behavior is available for the Common Custom User Data Gradle plugin, which enriches any build scans published with additional useful information.
## Enabling Develocity injection
### Enabling Develocity injection
To enable Develocity injection for your build, you must provide the required configuration via inputs.
@@ -739,7 +831,7 @@ Here's a minimal example:
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
develocity-injection-enabled: true
develocity-url: https://develocity.your-server.com
@@ -749,14 +841,14 @@ Here's a minimal example:
run: ./gradlew build
```
This configuration will automatically apply `v3.17.6` of the [Develocity Gradle plugin](https://docs.gradle.com/develocity/gradle-plugin/), and publish build scans to https://develocity.your-server.com.
This configuration will automatically apply `v3.18.1` of the [Develocity Gradle plugin](https://docs.gradle.com/develocity/gradle-plugin/), and publish build scans to https://develocity.your-server.com.
This example assumes that the `develocity.your-server.com` server allows anonymous publishing of build scans.
In the likely scenario that your Develocity server requires authentication, you will also need to pass a valid [Develocity access key](https://docs.gradle.com/develocity/gradle-plugin/#via_environment_variable) taken from a secret:
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
develocity-access-key: ${{ secrets.MY_DEVELOCITY_ACCESS_KEY }}
@@ -770,14 +862,7 @@ In the likely scenario that your Develocity server requires authentication, you
This access key will be used during the action execution to get a short-lived token and set it to the DEVELOCITY_ACCESS_KEY environment variable.
### Short-lived access tokens
Develocity access keys are long-lived, creating risks if they are leaked. To avoid this, users can use short-lived access tokens to authenticate with Develocity. Access tokens can be used wherever an access key would be used. Access tokens are only valid for the Develocity instance that created them.
If a short-lived token fails to be retrieved (for example, if the Develocity server version is lower than `2024.1`):
- if a `GRADLE_ENTERPRISE_ACCESS_KEY` env var has been set, we're falling back to it with a deprecation warning
- otherwise no access key env var will be set. In that case Develocity authenticated operations like build cache read/write and build scan publication will fail without failing the build.
For more information on short-lived tokens, see [Develocity API documentation](https://docs.gradle.com/develocity/api-manual/#short_lived_access_tokens).
## Configuring Develocity injection
### Configuring Develocity injection
The `init-script` supports several additional configuration parameters that you may find useful. All configuration options (required and optional) are detailed below:
@@ -814,33 +899,16 @@ Here's an example using the env vars:
```yaml
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Run a Gradle build with Develocity injection enabled with environment variables
run: ./gradlew build
env:
DEVELOCITY_INJECTION_ENABLED: true
DEVELOCITY_URL: https://develocity.your-server.com
DEVELOCITY_PLUGIN_VERSION: 3.17.6
```
## Publishing to scans.gradle.com
Develocity injection is designed to enable the publishing of build scans to a Develocity instance,
but is also useful for publishing to the public Build Scans instance (https://scans.gradle.com).
To publish to https://scans.gradle.com, you must specify in your workflow that you accept the [Gradle Terms of Use](https://gradle.com/help/legal-terms-of-use).
```yaml
- name: Setup Gradle to publish build scans
uses: gradle/actions/setup-gradle@v3
with:
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 a Gradle build - a build scan will be published automatically
run: ./gradlew build
DEVELOCITY_ENFORCE_URL: true
DEVELOCITY_PLUGIN_VERSION: "3.18.1"
DEVELOCITY_CCUD_PLUGIN_VERSION: "2.0.2"
```
# Dependency verification

View File

@@ -4,8 +4,11 @@ This action validates the checksums of _all_ [Gradle Wrapper](https://docs.gradl
The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`.
The `setup-gradle` action will perform wrapper validation on each execution. If you are using `setup-gradle` in your
workflows, it is unlikely that you will need to use this action.
> [!NOTE]
> Starting with v4 the `setup-gradle` action will automatically [perform wrapper validation](../docs/setup-gradle.md#gradle-wrapper-validation)
> on each execution.
>
> If you are using `setup-gradle` in your workflows, it is unlikely that you will need to use the `wrapper-validation` action.
## The Gradle Wrapper Problem in Open Source
@@ -47,7 +50,7 @@ We created an example [Homoglyph attack PR here](https://github.com/JLLeitschuh/
Simply add this action to your workflow **after** having checked out your source tree and **before** running any Gradle build:
```yaml
uses: gradle/actions/wrapper-validation@v3
uses: gradle/actions/wrapper-validation@v4
```
This action step should precede any step using `gradle/gradle-build-action` or `gradle/actions/setup-gradle`.
@@ -70,7 +73,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3
- uses: gradle/actions/wrapper-validation@v4
```
## Contributing to an external GitHub Repository

View File

@@ -26,7 +26,7 @@ jobs:
distribution: 'temurin'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew build
```

View File

@@ -43,7 +43,8 @@ inputs:
cache-cleanup:
description: |
Specifies if the action should attempt to remove any stale/unused entries from the Gradle User Home prior to saving to the GitHub Actions cache.
By default, no cleanup is performed. It can be configured to run every time, or only when all Gradle builds succeed for the Job.
By default ('on-success'), cleanup is performed when all Gradle builds succeed for the Job.
This behaviour can be disabled ('never'), or configured to always run irrespective of the build outcome ('always').
Valid values are 'never', 'on-success' and 'always'.
required: false
default: 'on-success'

View File

@@ -1,3 +1,3 @@
# Configuration file for asdf version manager
nodejs 20.10.0
gradle 8.9
gradle 8.11

2796
sources/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -32,41 +32,40 @@
],
"license": "MIT",
"dependencies": {
"@actions/artifact": "2.1.4",
"@actions/cache": "3.2.4",
"@actions/core": "1.10.1",
"@actions/artifact": "2.1.11",
"@actions/cache": "3.3.0",
"@actions/core": "1.11.1",
"@actions/exec": "1.1.1",
"@actions/github": "6.0.0",
"@actions/glob": "0.4.0",
"@actions/http-client": "2.2.1",
"@actions/glob": "0.5.0",
"@actions/http-client": "2.2.3",
"@actions/tool-cache": "2.0.1",
"@octokit/rest": "20.1.0",
"@octokit/webhooks-types": "7.5.0",
"cheerio": "^1.0.0-rc.12",
"semver": "7.6.0",
"@octokit/rest": "21.0.2",
"@octokit/webhooks-types": "7.6.1",
"cheerio": "^1.0.0",
"semver": "7.6.3",
"string-argv": "0.3.2",
"typed-rest-client": "1.8.11",
"typed-rest-client": "2.1.0",
"unhomoglyph": "1.0.6",
"which": "4.0.0"
"which": "5.0.0"
},
"devDependencies": {
"@types/jest": "29.5.12",
"@types/node": "20.12.4",
"@types/unzipper": "0.10.9",
"@types/jest": "29.5.14",
"@types/node": "20.17.6",
"@types/unzipper": "0.10.10",
"@types/which": "3.0.4",
"@typescript-eslint/parser": "7.5.0",
"@vercel/ncc": "0.38.1",
"eslint": "8.57.0",
"eslint-plugin-github": "4.10.2",
"eslint-plugin-jest": "27.9.0",
"eslint-plugin-prettier": "5.1.3",
"@typescript-eslint/parser": "7.18.0",
"@vercel/ncc": "0.38.2",
"eslint": "8.57.1",
"eslint-plugin-github": "5.0.2",
"eslint-plugin-jest": "28.9.0",
"jest": "29.7.0",
"js-yaml": "4.1.0",
"nock": "13.5.4",
"nock": "13.5.6",
"npm-run-all": "4.1.5",
"patch-package": "8.0.0",
"prettier": "3.2.5",
"ts-jest": "29.1.2",
"typescript": "5.4.3"
"prettier": "3.3.3",
"ts-jest": "29.2.5",
"typescript": "5.6.3"
}
}

View File

@@ -18,15 +18,23 @@ export async function run(): Promise<void> {
const result = await validate.findInvalidWrapperJars(
path.resolve('.'),
+core.getInput('min-wrapper-count'),
core.getInput('allow-snapshots') === 'true',
core.getInput('allow-checksums').split(',')
)
if (result.isValid()) {
core.info(result.toDisplayString())
const minWrapperCount = +core.getInput('min-wrapper-count')
if (result.valid.length < minWrapperCount) {
const message =
result.valid.length === 0
? 'Wrapper validation failed: no Gradle Wrapper jars found. Did you forget to checkout the repository?'
: `Wrapper validation failed: expected at least ${minWrapperCount} Gradle Wrapper jars, but found ${result.valid.length}.`
core.setFailed(message)
}
} else {
core.setFailed(
`Gradle Wrapper Validation Failed!\n See https://github.com/gradle/actions/blob/main/docs/wrapper-validation.md#reporting-failures\n${result.toDisplayString()}`
`At least one Gradle Wrapper Jar failed validation!\n See https://github.com/gradle/actions/blob/main/docs/wrapper-validation.md#validation-failures\n${result.toDisplayString()}`
)
if (result.invalid.length > 0) {
core.setOutput('failed-wrapper', `${result.invalid.map(w => w.path).join('|')}`)

View File

@@ -44,22 +44,24 @@ export class CacheCleaner {
settings.caches {
cleanup = Cleanup.ALWAYS
releasedWrappers.removeUnusedEntriesOlderThan.set(cleanupTime)
snapshotWrappers.removeUnusedEntriesOlderThan.set(cleanupTime)
downloadedResources.removeUnusedEntriesOlderThan.set(cleanupTime)
createdResources.removeUnusedEntriesOlderThan.set(cleanupTime)
buildCache.removeUnusedEntriesOlderThan.set(cleanupTime)
releasedWrappers.setRemoveUnusedEntriesOlderThan(cleanupTime)
snapshotWrappers.setRemoveUnusedEntriesOlderThan(cleanupTime)
downloadedResources.setRemoveUnusedEntriesOlderThan(cleanupTime)
createdResources.setRemoveUnusedEntriesOlderThan(cleanupTime)
buildCache.setRemoveUnusedEntriesOlderThan(cleanupTime)
}
}
`
)
fs.writeFileSync(path.resolve(cleanupProjectDir, 'build.gradle'), 'task("noop") {}')
const executable = await provisioner.provisionGradle('current')
// Gradle >= 8.11 required for cache cleanup
// TODO: This is ineffective: we should be using the newest version of Gradle that ran a build, or a newer version if it's available on PATH.
const executable = await provisioner.provisionGradleAtLeast('8.11')
await core.group('Executing Gradle to clean up caches', async () => {
core.info(`Cleaning up caches last used before ${cleanTimestamp}`)
await this.executeCleanupBuild(executable!, cleanupProjectDir)
await this.executeCleanupBuild(executable, cleanupProjectDir)
})
}
@@ -77,11 +79,8 @@ export class CacheCleaner {
'noop'
]
const result = await exec.getExecOutput(executable, args, {
cwd: cleanupProjectDir,
silent: true
await exec.exec(executable, args, {
cwd: cleanupProjectDir
})
core.info(result.stdout)
}
}

View File

@@ -110,10 +110,12 @@ export class CacheEntryListener {
requestedRestoreKeys: string[] | undefined
restoredKey: string | undefined
restoredSize: number | undefined
restoredTime: number | undefined
notRestored: string | undefined
savedKey: string | undefined
savedSize: number | undefined
savedTime: number | undefined
notSaved: string | undefined
constructor(entryName: string) {
@@ -130,9 +132,10 @@ export class CacheEntryListener {
return this
}
markRestored(key: string, size: number | undefined): CacheEntryListener {
markRestored(key: string, size: number | undefined, time: number): CacheEntryListener {
this.restoredKey = key
this.restoredSize = size
this.restoredTime = time
return this
}
@@ -141,9 +144,10 @@ export class CacheEntryListener {
return this
}
markSaved(key: string, size: number | undefined): CacheEntryListener {
markSaved(key: string, size: number | undefined, time: number): CacheEntryListener {
this.savedKey = key
this.savedSize = size
this.savedTime = time
return this
}
@@ -182,14 +186,16 @@ ${renderEntryTable(entries)}
function renderEntryTable(entries: CacheEntryListener[]): string {
return `
<table>
<tr><td></td><th>Count</th><th>Total Size (Mb)</th></tr>
<tr><td></td><th>Count</th><th>Total Size (Mb)</th><th>Total Time (ms)</tr>
<tr><td>Entries Restored</td>
<td>${getCount(entries, e => e.restoredSize)}</td>
<td>${getSize(entries, e => e.restoredSize)}</td>
<td>${getTime(entries, e => e.restoredTime)}</td>
</tr>
<tr><td>Entries Saved</td>
<td>${getCount(entries, e => e.savedSize)}</td>
<td>${getSize(entries, e => e.savedSize)}</td>
<td>${getTime(entries, e => e.savedTime)}</td>
</tr>
</table>
`
@@ -202,9 +208,11 @@ function renderEntryDetails(listener: CacheListener): string {
Requested Key : ${entry.requestedKey ?? ''}
Restored Key : ${entry.restoredKey ?? ''}
Size: ${formatSize(entry.restoredSize)}
Time: ${formatTime(entry.restoredTime)}
${getRestoredMessage(entry, listener.cacheWriteOnly)}
Saved Key : ${entry.savedKey ?? ''}
Size: ${formatSize(entry.savedSize)}
Time: ${formatTime(entry.savedTime)}
${getSavedMessage(entry, listener.cacheReadOnly)}
`
)
@@ -264,9 +272,23 @@ function getSize(
return Math.round(bytes / (1024 * 1024))
}
function getTime(
cacheEntries: CacheEntryListener[],
predicate: (value: CacheEntryListener) => number | undefined
): number {
return cacheEntries.map(e => predicate(e) ?? 0).reduce((p, v) => p + v, 0)
}
function formatSize(bytes: number | undefined): string {
if (bytes === undefined || bytes === 0) {
return ''
}
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`
}
function formatTime(ms: number | undefined): string {
if (ms === undefined || ms === 0) {
return ''
}
return `${ms} ms`
}

View File

@@ -38,13 +38,16 @@ export async function restoreCache(
): Promise<cache.CacheEntry | undefined> {
listener.markRequested(cacheKey, cacheRestoreKeys)
try {
const startTime = Date.now()
// Only override the read timeout if the SEGMENT_DOWNLOAD_TIMEOUT_MINS env var has NOT been set
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
? {}
: {segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT}
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions)
if (restoredEntry !== undefined) {
listener.markRestored(restoredEntry.key, restoredEntry.size)
const restoreTime = Date.now() - startTime
listener.markRestored(restoredEntry.key, restoredEntry.size, restoreTime)
core.info(`Restored cache entry with key ${cacheKey} to ${cachePath.join()} in ${restoreTime}ms`)
}
return restoredEntry
} catch (error) {
@@ -56,8 +59,11 @@ export async function restoreCache(
export async function saveCache(cachePath: string[], cacheKey: string, listener: CacheEntryListener): Promise<void> {
try {
const startTime = Date.now()
const savedEntry = await cache.saveCache(cachePath, cacheKey)
listener.markSaved(savedEntry.key, savedEntry.size)
const saveTime = Date.now() - startTime
listener.markSaved(savedEntry.key, savedEntry.size, saveTime)
core.info(`Saved cache entry with key ${cacheKey} from ${cachePath.join()} in ${saveTime}ms`)
} catch (error) {
if (error instanceof cache.ReserveCacheError) {
listener.markAlreadyExists(cacheKey)

View File

@@ -2,7 +2,6 @@ import path from 'path'
import fs from 'fs'
import * as core from '@actions/core'
import * as glob from '@actions/glob'
import * as semver from 'semver'
import {CacheEntryListener, CacheListener} from './cache-reporting'
import {cacheDebug, hashFileNames, isCacheDebuggingEnabled, restoreCache, saveCache, tryDelete} from './cache-utils'
@@ -10,6 +9,7 @@ import {cacheDebug, hashFileNames, isCacheDebuggingEnabled, restoreCache, saveCa
import {BuildResult, loadBuildResults} from '../build-results'
import {CacheConfig, ACTION_METADATA_DIR} from '../configuration'
import {getCacheKeyBase} from './cache-key'
import {versionIsAtLeast} from '../execution/gradle'
const SKIP_RESTORE_VAR = 'GRADLE_BUILD_ACTION_SKIP_RESTORE'
const CACHE_PROTOCOL_VERSION = 'v1'
@@ -132,9 +132,8 @@ abstract class AbstractEntryExtractor {
pattern: string,
listener: CacheEntryListener
): Promise<ExtractedCacheEntry> {
const restoredEntry = await restoreCache([pattern], cacheKey, [], listener)
const restoredEntry = await restoreCache(pattern.split('\n'), cacheKey, [], listener)
if (restoredEntry) {
core.info(`Restored ${artifactType} with key ${cacheKey} to ${pattern}`)
return new ExtractedCacheEntry(artifactType, pattern, cacheKey)
} else {
core.info(`Did not restore ${artifactType} with key ${cacheKey} to ${pattern}`)
@@ -232,8 +231,7 @@ abstract class AbstractEntryExtractor {
cacheDebug(`No change to previously restored ${artifactType}. Not saving.`)
entryListener.markNotSaved('contents unchanged')
} else {
core.info(`Caching ${artifactType} with path '${pattern}' and cache key: ${cacheKey}`)
await saveCache([pattern], cacheKey, entryListener)
await saveCache(pattern.split('\n'), cacheKey, entryListener)
}
for (const file of matchingFiles) {
@@ -434,8 +432,7 @@ export class ConfigurationCacheEntryExtractor extends AbstractEntryExtractor {
// If any associated build result used Gradle < 8.6, then mark it as not cacheable
if (
pathResults.find(result => {
const gradleVersion = semver.coerce(result.gradleVersion)
return gradleVersion && semver.lt(gradleVersion, '8.6.0')
return !versionIsAtLeast(result.gradleVersion, '8.6.0')
})
) {
core.info(

View File

@@ -60,7 +60,8 @@ export class GradleUserHomeCache {
restoreKeys:[${cacheKey.restoreKeys}]`
)
const cacheResult = await restoreCache(this.getCachePath(), cacheKey.key, cacheKey.restoreKeys, entryListener)
const cachePath = this.getCachePath()
const cacheResult = await restoreCache(cachePath, cacheKey.key, cacheKey.restoreKeys, entryListener)
if (!cacheResult) {
core.info(`${this.cacheDescription} cache not found. Will initialize empty.`)
return
@@ -68,8 +69,6 @@ export class GradleUserHomeCache {
core.saveState(RESTORED_CACHE_KEY_KEY, cacheResult.key)
core.info(`Restored ${this.cacheDescription} from cache key: ${cacheResult.key}`)
try {
await this.afterRestore(listener)
} catch (error) {
@@ -120,10 +119,8 @@ export class GradleUserHomeCache {
return
}
core.info(`Caching ${this.cacheDescription} with cache key: ${cacheKey}`)
const cachePath = this.getCachePath()
await saveCache(cachePath, cacheKey, gradleHomeEntryListener)
return
}

View File

@@ -7,7 +7,7 @@ export async function setup(config: BuildScanConfig): Promise<void> {
maybeExportVariable('DEVELOCITY_AUTO_INJECTION_CUSTOM_VALUE', 'gradle-actions')
if (config.getBuildScanPublishEnabled()) {
maybeExportVariable('DEVELOCITY_INJECTION_ENABLED', 'true')
maybeExportVariable('DEVELOCITY_PLUGIN_VERSION', '3.17.6')
maybeExportVariable('DEVELOCITY_PLUGIN_VERSION', '3.18.1')
maybeExportVariable('DEVELOCITY_CCUD_PLUGIN_VERSION', '2.0')
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_URL', config.getBuildScanTermsOfUseUrl())
maybeExportVariable('DEVELOCITY_TERMS_OF_USE_AGREE', config.getBuildScanTermsOfUseAgree())

View File

@@ -72,7 +72,7 @@ class ShortLivedTokenClient {
retryInterval = 1000
async fetchToken(serverUrl: string, accessKey: HostnameAccessKey, expiry: string): Promise<HostnameAccessKey> {
const queryParams = expiry ? `?expiresInHours${expiry}` : ''
const queryParams = expiry ? `?expiresInHours=${expiry}` : ''
const sanitizedServerUrl = !serverUrl.endsWith('/') ? `${serverUrl}/` : serverUrl
const headers = {
'Content-Type': 'application/json',

View File

@@ -1,6 +1,8 @@
import * as core from '@actions/core'
import * as exec from '@actions/exec'
import which from 'which'
import * as semver from 'semver'
import * as provisioner from './provision'
import * as gradlew from './gradlew'
@@ -31,3 +33,42 @@ async function executeGradleBuild(executable: string | undefined, root: string,
core.setFailed(`Gradle build failed: see console output for details`)
}
}
export function versionIsAtLeast(actualVersion: string, requiredVersion: string): boolean {
const splitVersion = actualVersion.split('-')
const coreVersion = splitVersion[0]
const prerelease = splitVersion.length > 1
const actualSemver = semver.coerce(coreVersion)!
const comparisonSemver = semver.coerce(requiredVersion)!
if (prerelease) {
return semver.gt(actualSemver, comparisonSemver)
} else {
return semver.gte(actualSemver, comparisonSemver)
}
}
export async function findGradleVersionOnPath(): Promise<GradleExecutable | undefined> {
const gradleExecutable = await which('gradle', {nothrow: true})
if (gradleExecutable) {
const output = await exec.getExecOutput(gradleExecutable, ['-v'], {silent: true})
const version = parseGradleVersionFromOutput(output.stdout)
return version ? new GradleExecutable(version, gradleExecutable) : undefined
}
return undefined
}
export function parseGradleVersionFromOutput(output: string): string | undefined {
const regex = /Gradle (\d+\.\d+(\.\d+)?(-.*)?)/
const versionString = output.match(regex)?.[1]
return versionString
}
class GradleExecutable {
constructor(
readonly version: string,
readonly executable: string
) {}
}

View File

@@ -1,13 +1,12 @@
import * as fs from 'fs'
import * as os from 'os'
import * as path from 'path'
import which from 'which'
import * as httpm from '@actions/http-client'
import * as core from '@actions/core'
import * as cache from '@actions/cache'
import * as exec from '@actions/exec'
import * as toolCache from '@actions/tool-cache'
import {findGradleVersionOnPath, versionIsAtLeast} from './gradle'
import * as gradlew from './gradlew'
import {handleCacheFailure} from '../caching/cache-utils'
import {CacheConfig} from '../configuration'
@@ -26,6 +25,16 @@ export async function provisionGradle(gradleVersion: string): Promise<string | u
return undefined
}
/**
* Ensure that the Gradle version on PATH is no older than the specified version.
* If the version on PATH is older, install the specified version and add it to the PATH.
* @return Installed Gradle executable or undefined if no version configured.
*/
export async function provisionGradleAtLeast(gradleVersion: string): Promise<string> {
const installedVersion = await installGradleVersionAtLeast(await gradleRelease(gradleVersion))
return addToPath(installedVersion)
}
async function addToPath(executable: string): Promise<string> {
core.addPath(path.dirname(executable))
return executable
@@ -51,7 +60,7 @@ async function resolveGradleVersion(version: string): Promise<GradleVersionInfo>
case 'release-nightly':
return gradleReleaseNightly()
default:
return gradle(version)
return gradleRelease(version)
}
}
@@ -76,7 +85,7 @@ async function gradleReleaseNightly(): Promise<GradleVersionInfo> {
return await gradleVersionDeclaration(`${gradleVersionsBaseUrl}/release-nightly`)
}
async function gradle(version: string): Promise<GradleVersionInfo> {
async function gradleRelease(version: string): Promise<GradleVersionInfo> {
const versionInfo = await findGradleVersionDeclaration(version)
if (!versionInfo) {
throw new Error(`Gradle version ${version} does not exists`)
@@ -97,10 +106,24 @@ async function findGradleVersionDeclaration(version: string): Promise<GradleVers
async function installGradleVersion(versionInfo: GradleVersionInfo): Promise<string> {
return core.group(`Provision Gradle ${versionInfo.version}`, async () => {
const preInstalledGradle = await findGradleVersionOnPath(versionInfo)
if (preInstalledGradle !== undefined) {
const gradleOnPath = await findGradleVersionOnPath()
if (gradleOnPath?.version === versionInfo.version) {
core.info(`Gradle version ${versionInfo.version} is already available on PATH. Not installing.`)
return preInstalledGradle
return gradleOnPath.executable
}
return locateGradleAndDownloadIfRequired(versionInfo)
})
}
async function installGradleVersionAtLeast(versionInfo: GradleVersionInfo): Promise<string> {
return core.group(`Provision Gradle >= ${versionInfo.version}`, async () => {
const gradleOnPath = await findGradleVersionOnPath()
if (gradleOnPath && versionIsAtLeast(gradleOnPath.version, versionInfo.version)) {
core.info(
`Gradle version ${gradleOnPath.version} is available on PATH and >= ${versionInfo.version}. Not installing.`
)
return gradleOnPath.executable
}
return locateGradleAndDownloadIfRequired(versionInfo)
@@ -192,15 +215,3 @@ interface GradleVersionInfo {
version: string
downloadUrl: string
}
async function findGradleVersionOnPath(versionInfo: GradleVersionInfo): Promise<string | undefined> {
const gradleExecutable = await which('gradle', {nothrow: true})
if (gradleExecutable) {
const output = await exec.getExecOutput(gradleExecutable, ['-v'], {silent: true})
if (output.stdout.includes(`Gradle ${versionInfo.version}`)) {
return gradleExecutable
}
}
return undefined
}

View File

@@ -43,7 +43,7 @@ export async function generateJobSummary(
async function addPRComment(jobSummary: string): Promise<void> {
const context = github.context
if (context.payload.pull_request == null) {
core.info('No pull_request trigger: not adding PR comment')
core.info('No pull_request trigger detected: not adding PR comment')
return
}

View File

@@ -5,7 +5,6 @@ import {resolve} from 'path'
export async function findInvalidWrapperJars(
gitRepoRoot: string,
minWrapperCount: number,
allowSnapshots: boolean,
allowedChecksums: string[],
previouslyValidatedChecksums: string[] = [],
@@ -13,11 +12,6 @@ export async function findInvalidWrapperJars(
): Promise<ValidationResult> {
const wrapperJars = await find.findWrapperJars(gitRepoRoot)
const result = new ValidationResult([], [])
if (wrapperJars.length < minWrapperCount) {
result.errors.push(
`Expected to find at least ${minWrapperCount} Gradle Wrapper JARs but got only ${wrapperJars.length}`
)
}
if (wrapperJars.length > 0) {
const notYetValidatedWrappers = []
for (const wrapperJar of wrapperJars) {
@@ -54,7 +48,6 @@ export class ValidationResult {
valid: WrapperJar[]
invalid: WrapperJar[]
fetchedChecksums = false
errors: string[] = []
constructor(valid: WrapperJar[], invalid: WrapperJar[]) {
this.valid = valid
@@ -62,7 +55,7 @@ export class ValidationResult {
}
isValid(): boolean {
return this.invalid.length === 0 && this.errors.length === 0
return this.invalid.length === 0
}
toDisplayString(): string {
@@ -72,10 +65,6 @@ export class ValidationResult {
this.invalid
)}`
}
if (this.errors.length > 0) {
if (displayString.length > 0) displayString += '\n'
displayString += `✗ Other validation errors:\n ${this.errors.join(`\n `)}`
}
if (this.valid.length > 0) {
if (displayString.length > 0) displayString += '\n'
displayString += `✓ Found known Gradle Wrapper JAR files:\n${ValidationResult.toDisplayList(this.valid)}`

View File

@@ -1,4 +1,44 @@
[
{
"version": "8.11",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.11-rc-3",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.11-rc-2",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.11-rc-1",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.11-milestone-1",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.10.2",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.10.2-milestone-1",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.10.1",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.10",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.10-rc-1",
"checksum": "2db75c40782f5e8ba1fc278a5574bab070adccb2d21ca5a6e5ed840888448046"
},
{
"version": "8.9",
"checksum": "498495120a03b9a6ab5d155f5de3c8f0d986a449153702fb80fc80e134484f17"

View File

@@ -20,20 +20,19 @@ export async function validateWrappers(
const result = await findInvalidWrapperJars(
workspaceRoot,
0,
config.allowSnapshotWrappers(),
allowedChecksums,
previouslyValidatedChecksums
)
if (result.isValid()) {
await core.group('All Gradle Wrapper jars are valid', async () => {
core.info(`Loaded previously validated checksums from cache: ${previouslyValidatedChecksums.join(', ')}`)
core.debug(`Loaded previously validated checksums from cache: ${previouslyValidatedChecksums.join(', ')}`)
core.info(result.toDisplayString())
})
} else {
core.info(result.toDisplayString())
throw new JobFailure(
`Gradle Wrapper Validation Failed!\n See https://github.com/gradle/actions/blob/main/docs/wrapper-validation.md#validation-failures\n${result.toDisplayString()}`
`At least one Gradle Wrapper Jar failed validation!\n See https://github.com/gradle/actions/blob/main/docs/wrapper-validation.md#validation-failures\n${result.toDisplayString()}`
)
}

View File

@@ -20,7 +20,7 @@ dependencies {
testImplementation ('io.ratpack:ratpack-groovy-test:1.9.0') {
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
}
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.17.2'
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.18.1'
}
test {

View File

@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionSha256Sum=31c55713e40233a8303827ceb42ca48a47267a0ad4bab9177123121e71524c26
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View File

@@ -1,5 +1,5 @@
plugins {
id "com.gradle.develocity" version "3.17.6"
id "com.gradle.develocity" version "3.18.1"
id "com.gradle.common-custom-user-data-gradle-plugin" version "2.0.1"
}

View File

@@ -16,25 +16,28 @@ import java.nio.file.Files
import java.util.zip.GZIPOutputStream
class BaseInitScriptTest extends Specification {
static final String DEVELOCITY_PLUGIN_VERSION = '3.17.6'
static final String DEVELOCITY_PLUGIN_VERSION = '3.18.1'
static final String CCUD_PLUGIN_VERSION = '2.0.1'
static final TestGradleVersion GRADLE_3_X = new TestGradleVersion(GradleVersion.version('3.5.1'), 7, 9)
static final TestGradleVersion GRADLE_4_X = new TestGradleVersion(GradleVersion.version('4.10.3'), 7, 10)
static final TestGradleVersion GRADLE_5_X = new TestGradleVersion(GradleVersion.version('5.6.4'), 8, 12)
static final TestGradleVersion GRADLE_6_0 = new TestGradleVersion(GradleVersion.version('6.0.1'), 8, 13)
static final TestGradleVersion GRADLE_6_NO_BUILD_SERVICE = new TestGradleVersion(GradleVersion.version('6.5.1'), 8, 14)
static final TestGradleVersion GRADLE_6_X = new TestGradleVersion(GradleVersion.version('6.9.4'), 8, 15)
static final TestGradleVersion GRADLE_7_1 = new TestGradleVersion(GradleVersion.version('7.6.2'), 8, 19)
static final TestGradleVersion GRADLE_7_1 = new TestGradleVersion(GradleVersion.version('7.1.1'), 8, 16)
static final TestGradleVersion GRADLE_7_X = new TestGradleVersion(GradleVersion.version('7.6.2'), 8, 19)
static final TestGradleVersion GRADLE_8_0 = new TestGradleVersion(GradleVersion.version('8.0.2'), 8, 19)
static final TestGradleVersion GRADLE_8_X = new TestGradleVersion(GradleVersion.version('8.9'), 8, 22)
static final TestGradleVersion GRADLE_8_X = new TestGradleVersion(GradleVersion.version('8.10'), 8, 23)
static final List<TestGradleVersion> ALL_VERSIONS = [
GRADLE_3_X, // First version where TestKit supports environment variables
GRADLE_4_X,
GRADLE_5_X,
GRADLE_6_0,
GRADLE_6_NO_BUILD_SERVICE, // Last version without build service support
GRADLE_6_X,
GRADLE_7_1,
GRADLE_7_X,
GRADLE_8_0,
GRADLE_8_X,
@@ -44,7 +47,7 @@ class BaseInitScriptTest extends Specification {
[GRADLE_7_X, GRADLE_8_0, GRADLE_8_X]
static final List<TestGradleVersion> SETTINGS_PLUGIN_VERSIONS =
[GRADLE_6_X, GRADLE_7_X, GRADLE_8_0, GRADLE_8_X]
[GRADLE_6_X, GRADLE_7_1, GRADLE_7_X, GRADLE_8_0, GRADLE_8_X]
static final String PUBLIC_BUILD_SCAN_ID = 'i2wepy2gr7ovw'
static final String DEFAULT_SCAN_UPLOAD_TOKEN = 'scan-upload-token'

View File

@@ -196,7 +196,7 @@ class TestBuildResultRecorder extends BaseInitScriptTest {
when:
settingsFile.text = """
plugins {
id 'com.gradle.develocity' version '3.17.6' apply(false)
id 'com.gradle.develocity' version '3.18.1' apply(false)
}
gradle.settingsEvaluated {
apply plugin: 'com.gradle.develocity'

View File

@@ -53,8 +53,8 @@ test('will cleanup unused gradle versions', async () => {
const transforms3 = path.resolve(gradleUserHome, "caches/transforms-3")
const metadata100 = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.100")
const wrapper802 = path.resolve(gradleUserHome, "wrapper/dists/gradle-8.0.2-bin")
const gradleCurrent = path.resolve(gradleUserHome, "caches/8.9")
const metadataCurrent = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.106")
const gradleCurrent = path.resolve(gradleUserHome, "caches/8.11")
const metadataCurrent = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.107")
expect(fs.existsSync(gradle802)).toBe(true)
expect(fs.existsSync(transforms3)).toBe(true)

View File

@@ -1,3 +1,4 @@
import exp from 'constants'
import {CacheEntryListener, CacheListener} from '../../src/caching/cache-reporting'
describe('caching report', () => {
@@ -5,7 +6,7 @@ describe('caching report', () => {
it('with one requested entry report', async () => {
const report = new CacheListener()
report.entry('foo').markRequested('1', ['2'])
report.entry('bar').markRequested('3').markRestored('4', 500)
report.entry('bar').markRequested('3').markRestored('4', 500, 1000)
expect(report.fullyRestored).toBe(false)
})
})
@@ -22,13 +23,13 @@ describe('caching report', () => {
})
it('with restored entry report', async () => {
const report = new CacheListener()
report.entry('bar').markRequested('3').markRestored('4', 300)
report.entry('bar').markRequested('3').markRestored('4', 300, 1000)
expect(report.fullyRestored).toBe(true)
})
it('with multiple restored entry reportss', async () => {
const report = new CacheListener()
report.entry('foo').markRestored('4', 3300)
report.entry('bar').markRequested('3').markRestored('4', 333)
report.entry('foo').markRestored('4', 3300, 111)
report.entry('bar').markRequested('3').markRestored('4', 333, 1000)
expect(report.fullyRestored).toBe(true)
})
})
@@ -64,7 +65,7 @@ describe('caching report', () => {
const report = new CacheListener()
const entryReport = report.entry('foo')
entryReport.markRequested('1', ['2', '3'])
entryReport.markSaved('4', 100)
entryReport.markSaved('4', 100, 1000)
const stringRep = report.stringify()
const reportClone: CacheListener = CacheListener.rehydrate(stringRep)
@@ -73,6 +74,8 @@ describe('caching report', () => {
expect(entryClone.requestedKey).toBe('1')
expect(entryClone.requestedRestoreKeys).toEqual(['2', '3'])
expect(entryClone.savedKey).toBe('4')
expect(entryClone.savedSize).toBe(100)
expect(entryClone.savedTime).toBe(1000)
})
it('with live entry report', async () => {
const report = new CacheListener()
@@ -85,7 +88,7 @@ describe('caching report', () => {
// Check type and call method on rehydrated entry report
expect(entryClone).toBeInstanceOf(CacheEntryListener)
entryClone.markSaved('4', 100)
entryClone.markSaved('4', 100, 1000)
expect(entryClone.requestedKey).toBe('1')
expect(entryClone.requestedRestoreKeys).toEqual(['2', '3'])

View File

@@ -0,0 +1,104 @@
import { describe } from 'node:test'
import { versionIsAtLeast, parseGradleVersionFromOutput } from '../../src/execution/gradle'
describe('gradle', () => {
describe('can compare version with', () => {
it('same version', async () => {
expect(versionIsAtLeast('6.7.1', '6.7.1')).toBe(true)
expect(versionIsAtLeast('7.0', '7.0')).toBe(true)
expect(versionIsAtLeast('7.0', '7.0.0')).toBe(true)
})
it('newer version', async () => {
expect(versionIsAtLeast('6.7.1', '6.7.2')).toBe(false)
expect(versionIsAtLeast('7.0', '8.0')).toBe(false)
expect(versionIsAtLeast('7.0', '7.0.1')).toBe(false)
})
it('older version', async () => {
expect(versionIsAtLeast('6.7.2', '6.7.1')).toBe(true)
expect(versionIsAtLeast('8.0', '7.0')).toBe(true)
expect(versionIsAtLeast('7.0.1', '7.0')).toBe(true)
})
it('rc version', async () => {
expect(versionIsAtLeast('8.0.2-rc-1', '8.0.1')).toBe(true)
expect(versionIsAtLeast('8.0.2-rc-1', '8.0.2')).toBe(false)
expect(versionIsAtLeast('8.1-rc-1', '8.0')).toBe(true)
expect(versionIsAtLeast('8.0-rc-1', '8.0')).toBe(false)
})
it('snapshot version', async () => {
expect(versionIsAtLeast('8.11-20240829002031+0000', '8.10')).toBe(true)
expect(versionIsAtLeast('8.11-20240829002031+0000', '8.10.1')).toBe(true)
expect(versionIsAtLeast('8.11-20240829002031+0000', '8.11')).toBe(false)
expect(versionIsAtLeast('8.10.2-20240828012138+0000', '8.10')).toBe(true)
expect(versionIsAtLeast('8.10.2-20240828012138+0000', '8.10.1')).toBe(true)
expect(versionIsAtLeast('8.10.2-20240828012138+0000', '8.10.2')).toBe(false)
expect(versionIsAtLeast('8.10.2-20240828012138+0000', '8.11')).toBe(false)
expect(versionIsAtLeast('9.1-branch-provider_api_migration_public_api_changes-20240826121451+0000', '9.0')).toBe(true)
expect(versionIsAtLeast('9.1-branch-provider_api_migration_public_api_changes-20240826121451+0000', '9.0.1')).toBe(true)
expect(versionIsAtLeast('9.1-branch-provider_api_migration_public_api_changes-20240826121451+0000', '9.1')).toBe(false)
})
})
describe('can parse version from output', () => {
it('major version', async () => {
const output = `
------------------------------------------------------------
Gradle 8.9
------------------------------------------------------------
`
const version = await parseGradleVersionFromOutput(output)!
expect(version).toBe('8.9')
})
it('patch version', async () => {
const output = `
------------------------------------------------------------
Gradle 8.9.1
------------------------------------------------------------
`
const version = await parseGradleVersionFromOutput(output)!
expect(version).toBe('8.9.1')
})
it('rc version', async () => {
const output = `
------------------------------------------------------------
Gradle 8.9-rc-1
------------------------------------------------------------
`
const version = await parseGradleVersionFromOutput(output)!
expect(version).toBe('8.9-rc-1')
})
it('milestone version', async () => {
const output = `
------------------------------------------------------------
Gradle 8.0-milestone-6
------------------------------------------------------------
`
const version = await parseGradleVersionFromOutput(output)!
expect(version).toBe('8.0-milestone-6')
})
it('snapshot version', async () => {
const output = `
------------------------------------------------------------
Gradle 8.10.2-20240828012138+0000
------------------------------------------------------------
`
const version = await parseGradleVersionFromOutput(output)!
expect(version).toBe('8.10.2-20240828012138+0000')
})
it('branch version', async () => {
const output = `
------------------------------------------------------------
Gradle 9.0-branch-provider_api_migration_public_api_changes-20240830060514+0000
------------------------------------------------------------
`
const version = await parseGradleVersionFromOutput(output)!
expect(version).toBe('9.0-branch-provider_api_migration_public_api_changes-20240830060514+0000')
})
})
})

View File

@@ -114,4 +114,14 @@ describe('short lived tokens', () => {
.resolves
.toBeNull()
})
it('get short lived token with custom expiry', async () => {
nock('https://dev')
.post('/api/auth/token?expiresInHours=4')
.reply(200, 'token')
expect.assertions(1)
await expect(getToken('dev=key1', '4'))
.resolves
.toEqual({"keys": [{"hostname": "dev", "key": "token"}]})
})
})

View File

@@ -37,7 +37,8 @@ test('fetches wrapper jar checksums for snapshots', async () => {
const validChecksums = await checksums.fetchUnknownChecksums(true, new checksums.WrapperChecksums)
// Expect that at least one snapshot checksum is different from the non-snapshot checksums
expect(validChecksums.size).toBeGreaterThan(nonSnapshotChecksums.size)
expect(nonSnapshotChecksums.size).toBeGreaterThan(10)
expect(validChecksums.size).toBeGreaterThanOrEqual(nonSnapshotChecksums.size)
})
test('fetches all wrapper checksum URLS for snapshots', async () => {

View File

@@ -12,7 +12,7 @@ const baseDir = path.resolve('./test/jest/wrapper-validation')
const tmpDir = path.resolve('./test/jest/tmp')
test('succeeds if all found wrapper jars are valid', async () => {
const result = await validate.findInvalidWrapperJars(baseDir, 3, false, [
const result = await validate.findInvalidWrapperJars(baseDir, false, [
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
])
@@ -29,7 +29,7 @@ test('succeeds if all found wrapper jars are valid', async () => {
})
test('succeeds if all found wrapper jars are previously valid', async () => {
const result = await validate.findInvalidWrapperJars(baseDir, 3, false, [], [
const result = await validate.findInvalidWrapperJars(baseDir, false, [], [
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
'3888c76faa032ea8394b8a54e04ce2227ab1f4be64f65d450f8509fe112d38ce'
])
@@ -50,7 +50,6 @@ test('succeeds if all found wrapper jars are valid (and checksums are fetched fr
const knownValidChecksums = new WrapperChecksums()
const result = await validate.findInvalidWrapperJars(
baseDir,
1,
false,
['e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'],
[],
@@ -71,7 +70,7 @@ test('succeeds if all found wrapper jars are valid (and checksums are fetched fr
})
test('fails if invalid wrapper jars are found', async () => {
const result = await validate.findInvalidWrapperJars(baseDir, 3, false, [])
const result = await validate.findInvalidWrapperJars(baseDir, false, [])
expect(result.isValid()).toBe(false)
@@ -102,26 +101,6 @@ test('fails if invalid wrapper jars are found', async () => {
)
})
test('fails if not enough wrapper jars are found', async () => {
const result = await validate.findInvalidWrapperJars(baseDir, 4, false, [])
expect(result.isValid()).toBe(false)
expect(result.errors).toEqual([
'Expected to find at least 4 Gradle Wrapper JARs but got only 3'
])
expect(result.toDisplayString()).toBe(
'✗ Found unknown Gradle Wrapper JAR files:\n' +
' e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 data/invalid/gradle-wrapper.jar\n' +
' e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 data/invalid/gradlе-wrapper.jar\n' + // homoglyph
'✗ Other validation errors:\n' +
' Expected to find at least 4 Gradle Wrapper JARs but got only 3\n' +
'✓ Found known Gradle Wrapper JAR files:\n' +
' 3888c76faa032ea8394b8a54e04ce2227ab1f4be64f65d450f8509fe112d38ce data/valid/gradle-wrapper.jar'
)
})
test('can save and load checksums', async () => {
const cacheDir = path.join(tmpDir, 'wrapper-validation-cache')
fs.rmSync(cacheDir, {recursive: true, force: true})

View File

@@ -4,6 +4,12 @@ The `wrapper-validation` action validates the checksums of _all_ [Gradle Wrapper
The action should be run in the root of the repository, as it will recursively search for any files named `gradle-wrapper.jar`.
> [!NOTE]
> Starting with v4 the `setup-gradle` action will automatically [perform wrapper validation](../docs/setup-gradle.md#gradle-wrapper-validation)
> on each execution.
>
> If you are using `setup-gradle` in your workflows, it is unlikely that you will need to use the `wrapper-validation` action.
### Example workflow
```yaml
@@ -19,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3
- uses: gradle/actions/wrapper-validation@v4
```
See the [full action documentation](../docs/wrapper-validation.md) for more advanced usage scenarios.