Compare commits

..

58 Commits

Author SHA1 Message Date
Daz DeBoer
9b814496b5 Build outputs 2022-05-29 08:51:47 -06:00
Daz DeBoer
f2bb19b43a Remove downloaded wrapper zips before caching
The wrapper zip files are redundant, and not required after extraction.
Gradle 7.5+ will delete these automatically, but we delete them for older
versions to avoid caching the wrapper distributions twice.

Sinc the `gradle-home-cache-excludes` parameter does not support
wildcards, we remove them explicitly.
2022-05-29 08:49:36 -06:00
Daz DeBoer
e3ceb00204 Fix typo in worklow step 2022-05-29 08:48:46 -06:00
Daz DeBoer
116ac10f81 Bump dependencies
Production deps:
- Bump @actions/tool-cache from 1.7.2 to 2.0.1
- Bump @actions/http-client from 1.0.11 to 2.0.1
- Bump @actions/github from 5.0.1 to 5.0.3
- Bump @actions/cache from 2.0.2 to 2.0.4

Dev deps:
- Bump eslint from 8.14.0 to 8.15.0
- Bump eslint-plugin-jest from 26.2.0 to 26.2.2
- Bump jest from 27.5.1 to 28.1.0
- Bump ts-jst from 27.1.4 to 28.0.2
2022-05-15 10:27:50 -06:00
Daz DeBoer
9f1e4d5588 Allow 10 Dependabot PRs in parallel 2022-05-15 10:16:19 -06:00
Daz DeBoer
f1c309a163 Simplify Jest setup
- Remove explicit dependency on jest-circus: this is now the default runner
- Remove test timeout setting
- Remove @types/jest from explicit dependencies
2022-05-15 09:52:50 -06:00
Daz DeBoer
202e4e0271 Bump various dependencies
Production deps:
- Bump @actions/core:1.6.0 to 1.8.2

Development deps:
- Bump typescript from 4.6.3 to 4.6.4
- Bump @typescript-eslint/parser from 5.20.0 to 5.23.0
- Bump eslint-plugin-jest from 26.1.4 to 26.2.0
- Switch from deprecated @zeit/ncc to @vercel/ncc
2022-05-15 09:49:27 -06:00
Daz DeBoer
c3afc518f5 Merge pull request #250 from gradle/dependabot/npm_and_yarn/eslint-8.14.0
Bump eslint from 8.13.0 to 8.14.0
2022-04-23 20:18:42 -06:00
dependabot[bot]
1072fff97e Bump eslint from 8.13.0 to 8.14.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.13.0 to 8.14.0.
- [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.13.0...v8.14.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 22:49:36 +00:00
Daz DeBoer
04df35b994 Update changes for upcoming release 2022-04-19 19:26:51 -06:00
Daz DeBoer
0fa1a8d680 Merge pull request #243 from osfanbuff63/main
Fix readme markdown
2022-04-19 16:40:18 -06:00
Daz DeBoer
78039b1f7f Bump com.gradle.enterprise from 3.9 to 3.10 2022-04-19 16:38:47 -06:00
Daz DeBoer
b147a594b1 Bump @actions/glob to v0.3.0 2022-04-19 16:36:26 -06:00
Daz DeBoer
5298cab81e Merge pull request #245 from gradle/dependabot/npm_and_yarn/typescript-eslint/parser-5.20.0
Bump @typescript-eslint/parser from 5.19.0 to 5.20.0
2022-04-19 08:05:11 -06:00
dependabot[bot]
f0a35701c4 Bump @typescript-eslint/parser from 5.19.0 to 5.20.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.19.0 to 5.20.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/v5.20.0/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-18 22:28:16 +00:00
osfanbuff63
477313b699 Fix readme markdown
Signed-off-by: osfanbuff63 <91388253+osfanbuff63@users.noreply.github.com>
2022-04-15 08:43:05 -04:00
Daz DeBoer
90fd69fffb Merge pull request #242 from gradle/dependabot/npm_and_yarn/typescript-eslint/parser-5.19.0
Bump @typescript-eslint/parser from 5.18.0 to 5.19.0
2022-04-12 06:40:59 -06:00
dependabot[bot]
7bf980c8dd Bump @typescript-eslint/parser from 5.18.0 to 5.19.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.18.0 to 5.19.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/v5.19.0/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 22:22:38 +00:00
Daz DeBoer
27c4618d3e Bump @actions/cache from 2.0.1 to 2.0.2 2022-04-11 11:55:03 -07:00
Daz DeBoer
9f79f97603 Merge pull request #241 from gradle/dependabot/npm_and_yarn/eslint-plugin-jest-26.1.4
Bump eslint-plugin-jest from 26.1.3 to 26.1.4
2022-04-11 12:50:26 -06:00
Daz DeBoer
fdce5083a7 Merge pull request #240 from gradle/dependabot/npm_and_yarn/eslint-8.13.0
Bump eslint from 8.12.0 to 8.13.0
2022-04-11 12:50:15 -06:00
dependabot[bot]
f62c9ea5ea Bump eslint-plugin-jest from 26.1.3 to 26.1.4
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 26.1.3 to 26.1.4.
- [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/v26.1.3...v26.1.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 22:27:10 +00:00
dependabot[bot]
52fbfb7d9e Bump eslint from 8.12.0 to 8.13.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.12.0 to 8.13.0.
- [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.12.0...v8.13.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 22:27:03 +00:00
Daz DeBoer
9230b19200 Fix typo in README 2022-04-06 11:30:02 -06:00
Daz DeBoer
503956ef9b Merge pull request #235 from gradle/wrapperbot/gradle-build-action-sample-gradle-plugin/gradle-wrapper-7.4.2
Bump Gradle Wrapper from 7.4.2 to 7.4.2 in /.github/workflow-samples/gradle-plugin
2022-04-05 10:07:17 -06:00
Daz DeBoer
3ad927eab1 Merge pull request #236 from gradle/wrapperbot/gradle-build-action-sample-groovy-dsl/gradle-wrapper-7.4.2
Bump Gradle Wrapper from 7.4.2 to 7.4.2 in /.github/workflow-samples/groovy-dsl
2022-04-05 10:06:57 -06:00
Daz DeBoer
1b2936fed4 Merge pull request #237 from gradle/wrapperbot/gradle-build-action-sample-java-toolchain/gradle-wrapper-7.4.2
Bump Gradle Wrapper from 7.4.2 to 7.4.2 in /.github/workflow-samples/java-toolchain
2022-04-05 10:06:46 -06:00
Daz DeBoer
f313ba7cbe Merge pull request #238 from gradle/wrapperbot/gradle-build-action-sample-kotlin-dsl/gradle-wrapper-7.4.2
Bump Gradle Wrapper from 7.4.2 to 7.4.2 in /.github/workflow-samples/kotlin-dsl
2022-04-05 10:06:31 -06:00
bot-githubaction
191094ccb5 Bump Gradle Wrapper from 7.4.2 to 7.4.2 in /.github/workflow-samples/kotlin-dsl 2022-04-05 16:03:03 +00:00
bot-githubaction
a748ca2efa Bump Gradle Wrapper from 7.4.2 to 7.4.2 in /.github/workflow-samples/java-toolchain 2022-04-05 16:02:39 +00:00
bot-githubaction
501cd3b4dc Bump Gradle Wrapper from 7.4.2 to 7.4.2 in /.github/workflow-samples/groovy-dsl 2022-04-05 16:02:22 +00:00
bot-githubaction
9b724c303e Bump Gradle Wrapper from 7.4.2 to 7.4.2 in /.github/workflow-samples/gradle-plugin 2022-04-05 16:02:03 +00:00
Daz DeBoer
3c3fdfcc0c Moved workflow samples out of .github/workflows
The `.github/workflows` directory has additional permissions attached, preventing these
files from being by the Upgrade Gradle Wrapper plugin.
2022-04-05 09:55:31 -06:00
Daz DeBoer
3317bc450c Bump @actions/cache from 2.0.0 to 2.0.1 2022-04-04 21:46:52 -06:00
Daz DeBoer
0e24fa1975 Save/restore exploded Gradle dist rather than zip
To save space, future versions of Gradle are likely to delete the downloaded distribution
after extracting it. See gradle/gradle#3605 and gradle/gradle#19495.
To cater for this we will now save/restore the extracted distribution rather than the
downloaded zip file.
2022-04-04 21:43:31 -06:00
Daz DeBoer
bd717aced6 Merge pull request #233 from gradle/dependabot/npm_and_yarn/typescript-eslint/parser-5.18.0
Bump @typescript-eslint/parser from 5.17.0 to 5.18.0
2022-04-04 21:29:30 -06:00
dependabot[bot]
3b14e1426f Bump @typescript-eslint/parser from 5.17.0 to 5.18.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.17.0 to 5.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/v5.18.0/packages/parser)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-04 22:19:42 +00:00
Daz DeBoer
cde360986c Improve sample for build-scan comment on PR 2022-04-04 15:12:03 -06:00
Daz DeBoer
ff8a687227 Document use of upload-artifact to save build outputs 2022-04-04 15:07:16 -06:00
Daz DeBoer
f78055c629 Bump prettier to 2.6.2 2022-04-02 13:21:56 -06:00
Daz DeBoer
72e45fe25b Only run workflows when relevant files change 2022-04-02 12:51:23 -06:00
Daz DeBoer
cfe0b72a03 Bump to GE plugin v3.9 2022-04-02 12:45:18 -06:00
Daz DeBoer
a6bb0f87a3 Reformat Groovy to trigger Dependabot 2022-04-02 12:40:57 -06:00
Daz DeBoer
a1bb3349df Bump Jnit version in samples 2022-04-02 12:37:16 -06:00
Daz DeBoer
aabb2db775 Move workflow samples under .github 2022-04-02 12:33:04 -06:00
Daz DeBoer
01def677bf Ensure all Gradle samples are checked by Dependabot 2022-04-02 11:34:54 -06:00
Daz DeBoer
73602de30a Update test for wrapper upgrade 2022-04-02 11:20:31 -06:00
Daz DeBoer
aeb23a4bdd Merge pull request #222 from gradle/dependabot/npm_and_yarn/actions/github-5.0.1
Bump @actions/github from 5.0.0 to 5.0.1
2022-04-02 09:53:09 -06:00
Daz DeBoer
0a03a96401 Merge pull request #226 from gradle/wrapperbot/gradle-build-action-sample-kotlin-dsl/gradle-wrapper-7.4.2
Bump Gradle Wrapper from 7.4.1 to 7.4.2 in /__tests__/samples/kotlin-dsl
2022-04-02 09:52:54 -06:00
Daz DeBoer
3793ab6467 Merge pull request #225 from gradle/wrapperbot/gradle-build-action-sample-java-toolchain/gradle-wrapper-7.4.2
Bump Gradle Wrapper from 7.4.1 to 7.4.2 in /__tests__/samples/java-toolchain
2022-04-02 09:52:42 -06:00
Daz DeBoer
295371713e Merge pull request #224 from gradle/wrapperbot/gradle-build-action-sample-groovy-dsl/gradle-wrapper-7.4.2
Bump Gradle Wrapper from 7.4.1 to 7.4.2 in /__tests__/samples/groovy-dsl
2022-04-02 09:52:31 -06:00
Daz DeBoer
c616a64390 Merge pull request #223 from gradle/wrapperbot/gradle-build-action-sample-gradle-plugin/gradle-wrapper-7.4.2
Bump Gradle Wrapper from 7.4.1 to 7.4.2 in /__tests__/samples/gradle-plugin
2022-04-02 09:52:18 -06:00
bot-githubaction
f9f94e6203 Bump Gradle Wrapper from 7.4.1 to 7.4.2 in /__tests__/samples/kotlin-dsl 2022-04-01 02:48:16 +00:00
bot-githubaction
512233d0e6 Bump Gradle Wrapper from 7.4.1 to 7.4.2 in /__tests__/samples/java-toolchain 2022-04-01 02:47:49 +00:00
bot-githubaction
685c78279d Bump Gradle Wrapper from 7.4.1 to 7.4.2 in /__tests__/samples/groovy-dsl 2022-04-01 02:47:33 +00:00
bot-githubaction
41740501eb Bump Gradle Wrapper from 7.4.1 to 7.4.2 in /__tests__/samples/gradle-plugin 2022-04-01 02:47:17 +00:00
dependabot[bot]
6e17ebd67e Bump @actions/github from 5.0.0 to 5.0.1
Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

---
updated-dependencies:
- dependency-name: "@actions/github"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-31 22:19:10 +00:00
Daz DeBoer
f2b17e4179 Prepare for next release 2022-03-29 13:53:29 -06:00
69 changed files with 2832 additions and 10083 deletions

View File

@@ -10,16 +10,41 @@ updates:
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 10
ignore:
- dependency-name: "@types/node"
- package-ecosystem: "gradle"
directory: "__tests__/samples/kotlin-dsl"
directory: ".github/workflow-samples/gradle-plugin"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
- package-ecosystem: "gradle"
directory: "__tests__/samples/no-wrapper"
directory: ".github/workflow-samples/groovy-dsl"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
- package-ecosystem: "gradle"
directory: ".github/workflow-samples/java-toolchain"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
- package-ecosystem: "gradle"
directory: ".github/workflow-samples/kotlin-dsl"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
- package-ecosystem: "gradle"
directory: ".github/workflow-samples/no-wrapper"
registries:
- gradle-plugin-portal
schedule:
interval: "daily"
- package-ecosystem: "gradle"
directory: ".github/workflow-samples/no-wrapper-gradle-5"
registries:
- gradle-plugin-portal
schedule:

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=e5444a57cda4a95f90b0c9446a9e1b47d3d7f69057765bfb54bd4f482542d548
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
distributionSha256Sum=29e49b10984e585d8118b7d0bc452f944e386458df27371b49b4ac1dec4b7fda
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -7,7 +7,7 @@ repositories {
}
dependencies {
testImplementation('junit:junit:4.12')
testImplementation('junit:junit:4.13.2')
}
tasks.named("test").configure {

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=e5444a57cda4a95f90b0c9446a9e1b47d3d7f69057765bfb54bd4f482542d548
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
distributionSha256Sum=29e49b10984e585d8118b7d0bc452f944e386458df27371b49b4ac1dec4b7fda
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -13,5 +13,5 @@ repositories {
}
dependencies {
testImplementation('junit:junit:4.12')
testImplementation('junit:junit:4.13.2')
}

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=e5444a57cda4a95f90b0c9446a9e1b47d3d7f69057765bfb54bd4f482542d548
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
distributionSha256Sum=29e49b10984e585d8118b7d0bc452f944e386458df27371b49b4ac1dec4b7fda
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=e5444a57cda4a95f90b0c9446a9e1b47d3d7f69057765bfb54bd4f482542d548
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
distributionSha256Sum=29e49b10984e585d8118b7d0bc452f944e386458df27371b49b4ac1dec4b7fda
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -1,5 +1,5 @@
plugins {
id("com.gradle.enterprise") version "3.9"
id("com.gradle.enterprise") version "3.10"
}
gradleEnterprise {

View File

@@ -1,5 +1,5 @@
plugins {
id("com.gradle.build-scan") version("3.7")
id "com.gradle.build-scan" version "3.10"
}
gradleEnterprise {

View File

@@ -1,5 +1,5 @@
plugins {
id "com.gradle.enterprise" version "3.9"
id "com.gradle.enterprise" version "3.10"
}
gradleEnterprise {

View File

@@ -17,7 +17,7 @@ jobs:
uses: ./
continue-on-error: true
with:
build-root-directory: __tests__/samples/no-wrapper
build-root-directory: .github/workflow-samples/no-wrapper
arguments: help
bad-configuration:
@@ -29,6 +29,6 @@ jobs:
uses: ./
continue-on-error: true
with:
build-root-directory: __tests__/samples/no-wrapper
build-root-directory: .github/workflow-samples/no-wrapper
arguments: help
cache-disabled: yes

View File

@@ -4,6 +4,9 @@ on:
pull_request:
types: [assigned, review_requested]
push:
paths:
- '.github/**'
- 'dist/**'
workflow_dispatch:
concurrency:
@@ -24,7 +27,7 @@ jobs:
- name: Invoke with multi-line arguments
uses: ./
with:
build-root-directory: __tests__/samples/groovy-dsl
build-root-directory: .github/workflow-samples/groovy-dsl
arguments: |
--configuration-cache
--build-cache

View File

@@ -4,6 +4,9 @@ on:
pull_request:
types: [assigned, review_requested]
push:
paths:
- '.github/**'
- 'dist/**'
workflow_dispatch:
concurrency:
@@ -33,7 +36,7 @@ jobs:
gradle-home-cache-excludes: |
caches/build-cache-1
- name: Build using Gradle wrapper
working-directory: __tests__/samples/groovy-dsl
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test
# Test that the gradle-user-home cache will cache dependencies, by running build with --offline
@@ -57,7 +60,7 @@ jobs:
caches/build-cache-1
cache-read-only: true
- name: Execute Gradle build with --offline
working-directory: __tests__/samples/groovy-dsl
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test --offline
# Test that build scans are captured when caching is explicitly disabled
@@ -75,7 +78,7 @@ jobs:
cache-disabled: true
- name: Run Gradle build
id: gradle
working-directory: __tests__/samples/no-wrapper${{ matrix.build-root-suffix }}
working-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
run: gradle help "-DgradleVersionCheck=${{matrix.gradle}}"
- name: Check build scan url is captured
if: ${{ !steps.gradle.outputs.build-scan-url }}
@@ -96,7 +99,7 @@ jobs:
uses: ./
- name: Run Gradle build
id: gradle
working-directory: __tests__/samples/no-wrapper${{ matrix.build-root-suffix }}
working-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
run: gradle help "-DgradleVersionCheck=${{matrix.gradle}}"
- name: Check build scan url is captured
if: ${{ !steps.gradle.outputs.build-scan-url }}
@@ -121,7 +124,7 @@ jobs:
with:
cache-write-only: true
- name: Build using Gradle wrapper
working-directory: __tests__/samples/groovy-dsl
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test
verify-write-only-build:
@@ -140,6 +143,6 @@ jobs:
with:
cache-read-only: true
- name: Execute Gradle build with --offline
working-directory: __tests__/samples/groovy-dsl
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test --offline

View File

@@ -4,6 +4,9 @@ on:
pull_request:
types: [assigned, review_requested]
push:
paths:
- '.github/**'
- 'dist/**'
workflow_dispatch:
concurrency:
@@ -28,7 +31,7 @@ jobs:
- name: Setup Gradle
uses: ./
- name: Groovy build with configuration-cache enabled
working-directory: __tests__/samples/groovy-dsl
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test --configuration-cache
configuration-cache-groovy:
@@ -48,7 +51,7 @@ jobs:
cache-read-only: true
- name: Groovy build with configuration-cache enabled
id: execute
working-directory: __tests__/samples/groovy-dsl
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test --configuration-cache
- name: Check that configuration-cache was used
if: ${{ steps.execute.outputs.task_configured == 'yes' }}
@@ -76,7 +79,7 @@ jobs:
with:
cache-read-only: true
- name: Check execute Gradle build with configuration cache enabled (but not restored)
working-directory: __tests__/samples/groovy-dsl
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test --configuration-cache
seed-build-kotlin:
@@ -92,7 +95,7 @@ jobs:
- name: Setup Gradle
uses: ./
- name: Execute 'help' with configuration-cache enabled
working-directory: __tests__/samples/kotlin-dsl
working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew help --configuration-cache
modify-build-kotlin:
@@ -109,7 +112,7 @@ jobs:
- name: Setup Gradle
uses: ./
- name: Execute 'test' with configuration-cache enabled
working-directory: __tests__/samples/kotlin-dsl
working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew test --configuration-cache
# Test restore configuration-cache from the third build invocation
@@ -130,7 +133,7 @@ jobs:
cache-read-only: true
- name: Execute 'test' again with configuration-cache enabled
id: execute
working-directory: __tests__/samples/kotlin-dsl
working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew test --configuration-cache
- name: Check that configuration-cache was used
if: ${{ steps.execute.outputs.task_configured == 'yes' }}

View File

@@ -4,6 +4,9 @@ on:
pull_request:
types: [assigned, review_requested]
push:
paths:
- '.github/**'
- 'dist/**'
workflow_dispatch:
concurrency:
@@ -24,7 +27,7 @@ jobs:
- name: Setup Gradle
uses: ./
- name: Build using Gradle wrapper
working-directory: __tests__/samples/groovy-dsl
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test
# Test that the gradle-user-home cache will cache dependencies, by running build with --offline
@@ -42,7 +45,7 @@ jobs:
with:
cache-read-only: true
- name: Execute Gradle build with --offline
working-directory: __tests__/samples/groovy-dsl
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test --offline
# Test that the gradle-user-home cache will cache and restore local build-cache
@@ -60,7 +63,7 @@ jobs:
with:
cache-read-only: true
- name: Execute Gradle build and verify tasks from cache
working-directory: __tests__/samples/groovy-dsl
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test -DverifyCachedBuild=true
# Check that the build can run when Gradle User Home is not fully restored
@@ -80,6 +83,6 @@ jobs:
with:
cache-read-only: true
- name: Check executee Gradle build
working-directory: __tests__/samples/groovy-dsl
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test

View File

@@ -4,6 +4,9 @@ on:
pull_request:
types: [assigned, review_requested]
push:
paths:
- '.github/**'
- 'dist/**'
workflow_dispatch:
concurrency:
@@ -24,7 +27,7 @@ jobs:
- name: Setup Gradle
uses: ./
- name: Build using Gradle wrapper
working-directory: __tests__/samples/java-toolchain
working-directory: .github/workflow-samples/java-toolchain
run: ./gradlew test --info
# Test that the gradle-user-home cache will cache the toolchain, by running build with --offline
@@ -42,5 +45,5 @@ jobs:
with:
cache-read-only: true
- name: Execute Gradle build with --offline
working-directory: __tests__/samples/java-toolchain
working-directory: .github/workflow-samples/java-toolchain
run: ./gradlew test --info --offline

View File

@@ -4,6 +4,9 @@ on:
pull_request:
types: [assigned, review_requested]
push:
paths:
- '.github/**'
- 'dist/**'
workflow_dispatch:
concurrency:
@@ -21,10 +24,10 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Exucute Gradle build
- name: Execute Gradle build
uses: ./
with:
build-root-directory: __tests__/samples/groovy-dsl
build-root-directory: .github/workflow-samples/groovy-dsl
arguments: test
# Test that the gradle-user-home is restored
@@ -41,6 +44,6 @@ jobs:
uses: ./
with:
cache-read-only: true
build-root-directory: __tests__/samples/groovy-dsl
build-root-directory: .github/workflow-samples/groovy-dsl
arguments: test --offline -DverifyCachedBuild=true

View File

@@ -4,6 +4,9 @@ on:
pull_request:
types: [assigned, review_requested]
push:
paths:
- '.github/**'
- 'dist/**'
workflow_dispatch:
concurrency:
@@ -30,20 +33,20 @@ jobs:
uses: ./
with:
gradle-version: 6.9
build-root-directory: __tests__/samples/no-wrapper
build-root-directory: .github/workflow-samples/no-wrapper
arguments: help -DgradleVersionCheck=6.9
- name: Test use Gradle version alias
uses: ./
with:
gradle-version: release-candidate
build-root-directory: __tests__/samples/no-wrapper
build-root-directory: .github/workflow-samples/no-wrapper
arguments: help
- name: Test use defined Gradle executable
uses: ./
with:
gradle-executable: __tests__/samples/groovy-dsl/gradlew${{ matrix.script-suffix }}
build-root-directory: __tests__/samples/no-wrapper
arguments: help -DgradleVersionCheck=7.4.1
gradle-executable: .github/workflow-samples/groovy-dsl/gradlew${{ matrix.script-suffix }}
build-root-directory: .github/workflow-samples/no-wrapper
arguments: help -DgradleVersionCheck=7.4.2
gradle-versions:
strategy:
@@ -64,7 +67,7 @@ jobs:
id: gradle
with:
gradle-version: ${{matrix.gradle}}
build-root-directory: __tests__/samples/no-wrapper${{ matrix.build-root-suffix }}
build-root-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
arguments: help -DgradleVersionCheck=${{matrix.gradle}}
- name: Check build scan url
if: ${{ !steps.gradle.outputs.build-scan-url }}

View File

@@ -4,6 +4,9 @@ on:
pull_request:
types: [assigned, review_requested]
push:
paths:
- '.github/**'
- 'dist/**'
workflow_dispatch:
concurrency:
@@ -27,7 +30,7 @@ jobs:
- name: Setup Gradle
uses: ./
- name: Build using Gradle wrapper
working-directory: __tests__/samples/groovy-dsl
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test --info
# Test that the gradle-user-home cache will cache dependencies, by running build with --offline
@@ -45,7 +48,7 @@ jobs:
with:
cache-read-only: true
- name: Execute Gradle build with --offline
working-directory: __tests__/samples/groovy-dsl
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test --offline --info
# Test that the gradle-user-home cache will cache and restore local build-cache
@@ -63,5 +66,5 @@ jobs:
with:
cache-read-only: true
- name: Execute Gradle build and verify tasks from cache
working-directory: __tests__/samples/groovy-dsl
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test -DverifyCachedBuild=true --info

View File

@@ -4,6 +4,9 @@ on:
pull_request:
types: [assigned, review_requested]
push:
paths:
- '.github/**'
- 'dist/**'
workflow_dispatch:
concurrency:
@@ -31,21 +34,21 @@ jobs:
with:
gradle-version: 6.9
- name: Test uses Gradle v6.9
working-directory: __tests__/samples/no-wrapper
working-directory: .github/workflow-samples/no-wrapper
run: gradle help "-DgradleVersionCheck=6.9"
- name: Setup Gradle with v7.1.1
uses: ./
with:
gradle-version: 7.1.1
- name: Test uses Gradle v7.1.1
working-directory: __tests__/samples/no-wrapper
working-directory: .github/workflow-samples/no-wrapper
run: gradle help "-DgradleVersionCheck=7.1.1"
- name: Setup Gradle with release-candidate
uses: ./
with:
gradle-version: release-candidate
- name: Test use release-candidate
working-directory: __tests__/samples/no-wrapper
working-directory: .github/workflow-samples/no-wrapper
run: gradle help
gradle-versions:
@@ -68,7 +71,7 @@ jobs:
gradle-version: ${{ matrix.gradle }}
- name: Run Gradle build
id: gradle
working-directory: __tests__/samples/no-wrapper${{ matrix.build-root-suffix }}
working-directory: .github/workflow-samples/no-wrapper${{ matrix.build-root-suffix }}
run: gradle help "-DgradleVersionCheck=${{matrix.gradle}}"
- name: Check build scan url
if: ${{ !steps.gradle.outputs.build-scan-url }}

View File

@@ -4,6 +4,9 @@ on:
pull_request:
types: [assigned, review_requested]
push:
paths:
- '.github/**'
- 'dist/**'
workflow_dispatch:
concurrency:
@@ -25,7 +28,7 @@ jobs:
- name: Setup Gradle
uses: ./
- name: Build gradle-plugin project
working-directory: __tests__/samples/gradle-plugin
working-directory: .github/workflow-samples/gradle-plugin
run: ./gradlew build
verify-build:
@@ -40,5 +43,5 @@ jobs:
- name: Setup Gradle
uses: ./
- name: Build gradle-plugin project
working-directory: __tests__/samples/gradle-plugin
working-directory: .github/workflow-samples/gradle-plugin
run: ./gradlew build --offline

View File

@@ -4,6 +4,9 @@ on:
pull_request:
types: [assigned, review_requested]
push:
paths:
- '.github/**'
- 'dist/**'
workflow_dispatch:
concurrency:
@@ -25,7 +28,7 @@ jobs:
- name: Setup Gradle
uses: ./
- name: Build kotlin-dsl project
working-directory: __tests__/samples/kotlin-dsl
working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew build
verify-build:
@@ -40,5 +43,5 @@ jobs:
- name: Setup Gradle
uses: ./
- name: Build kotlin-dsl project
working-directory: __tests__/samples/kotlin-dsl
working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew build --offline

View File

@@ -6,16 +6,15 @@ jobs:
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 11
- uses: ./
- id: gradle
working-directory: __tests__/samples/kotlin-dsl
run: ./gradlew help
- name: "Comment build scan url"
- name: Checkout project sources
uses: actions/checkout@v2
- name: Setup Gradle
uses: ./
- name: Run build with Gradle wrapper
id: gradle
working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew build --scan
- name: "Add build scan URL as PR comment"
uses: actions/github-script@v5
with:
github-token: ${{secrets.GITHUB_TOKEN}}

View File

@@ -206,7 +206,7 @@ cache-disabled: true
### Cache keys
For distributions downloaded to satisfy a `gradle-version` parametere are stored outside of Gradle User Home and cached separately. The cache key is unique to the downloaded distribution and will not change over time.
Distributions downloaded to satisfy a `gradle-version` parameter are stored outside of Gradle User Home and cached separately. The cache key is unique to the downloaded distribution and will not change over time.
The state of the Gradle User Home and configuration-cache are highly dependent on the Gradle execution, so the cache key is composed of the current commit hash and the GitHub actions job id.
As such, the cache key is likely to change on each subsequent run of GitHub actions.
@@ -288,6 +288,32 @@ Each build is different, and some builds produce more Gradle User Home content t
[Cache debugging ](#cache-debugging-and-analysis) can provide insight into which cache entries are the largest,
and you can selectively [exclude content using `gradle-home-cache-exclude`](#gradle-user-home-cache-tuning).
## Saving build outputs
By default, a GitHub Actions workflow using `gradle-build-action` will record the log output and any Build Scan links for your build,
but any output files generated by the build will not be saved.
To save selected files from your build execution, you can use the core [Upload-Artifact](https://github.com/actions/upload-artifact) action.
For example:
```yaml
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v2
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run build with Gradle wrapper
run: ./gradlew build --scan
- name: Upload build reports
uses: actions/upload-artifact@v3
with:
name: build-reports
path: build/reports/
```
## Build scans
If your build publishes a [build scan](https://gradle.com/build-scans/) the `gradle-build-action` action will:
@@ -304,15 +330,14 @@ jobs:
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 11
- uses: gradle/gradle-build-action@v2
- id: gradle
run: ./gradlew build
- name: "Comment build scan url"
- name: Checkout project sources
uses: actions/checkout@v2
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run build with Gradle wrapper
id: gradle
run: ./gradlew build --scan
- name: "Add build scan URL as PR comment"
uses: actions/github-script@v5
if: github.event_name == 'pull_request' && failure()
with:

262
dist/main/index.js vendored

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

262
dist/post/index.js vendored

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

@@ -3,10 +3,8 @@ module.exports = {
moduleFileExtensions: ['js', 'ts', 'json'],
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
transform: {
'^.+\\.ts$': 'ts-jest'
},
verbose: true,
setupFilesAfterEnv: ['./jest.setup.js']
verbose: true
}

View File

@@ -1 +0,0 @@
jest.setTimeout(10000) // in milliseconds

4214
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -24,30 +24,28 @@
],
"license": "MIT",
"dependencies": {
"@actions/cache": "2.0.0",
"@actions/core": "1.6.0",
"@actions/cache": "2.0.4",
"@actions/core": "1.8.2",
"@actions/exec": "1.1.1",
"@actions/github": "5.0.0",
"@actions/glob": "0.2.1",
"@actions/http-client": "1.0.11",
"@actions/tool-cache": "1.7.2",
"@actions/github": "5.0.3",
"@actions/glob": "0.3.0",
"@actions/http-client": "2.0.1",
"@actions/tool-cache": "2.0.1",
"string-argv": "0.3.1"
},
"devDependencies": {
"@types/jest": "27.4.1",
"@types/node": "16.11.21",
"@types/unzipper": "0.10.5",
"@typescript-eslint/parser": "5.17.0",
"@zeit/ncc": "0.22.3",
"eslint": "8.12.0",
"@typescript-eslint/parser": "5.23.0",
"@vercel/ncc": "0.33.4",
"eslint": "8.15.0",
"eslint-plugin-github": "4.3.6",
"eslint-plugin-jest": "26.1.3",
"jest": "27.5.1",
"jest-circus": "27.5.1",
"eslint-plugin-jest": "26.2.2",
"jest": "28.1.0",
"js-yaml": "4.1.0",
"patch-package": "6.4.7",
"prettier": "2.6.1",
"ts-jest": "27.1.4",
"typescript": "4.6.3"
"prettier": "2.6.2",
"ts-jest": "28.0.2",
"typescript": "4.6.4"
}
}

View File

@@ -26,24 +26,10 @@ index 16b20f7..aea77ba 100644
+ constructor(key: string, size?: number);
+}
diff --git a/node_modules/@actions/cache/lib/cache.js b/node_modules/@actions/cache/lib/cache.js
index dd31592..cbe378a 100644
index 0b5a2a8..757ad88 100644
--- a/node_modules/@actions/cache/lib/cache.js
+++ b/node_modules/@actions/cache/lib/cache.js
@@ -37,6 +37,13 @@ class ReserveCacheError extends Error {
}
}
exports.ReserveCacheError = ReserveCacheError;
+class CacheEntry {
+ constructor(key, size) {
+ this.key = key;
+ this.size = size;
+ }
+}
+exports.CacheEntry = CacheEntry;
function checkPaths(paths) {
if (!paths || paths.length === 0) {
throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);
@@ -93,6 +100,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options) {
@@ -93,6 +93,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options) {
}
const archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod));
core.debug(`Archive Path: ${archivePath}`);
@@ -51,7 +37,7 @@ index dd31592..cbe378a 100644
try {
// Download the cache from the cache entry
yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options);
@@ -100,6 +108,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options) {
@@ -100,6 +101,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options) {
yield tar_1.listTar(archivePath, compressionMethod);
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
@@ -59,7 +45,7 @@ index dd31592..cbe378a 100644
core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);
yield tar_1.extractTar(archivePath, compressionMethod);
core.info('Cache restored successfully');
@@ -113,7 +122,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options) {
@@ -113,7 +115,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options) {
core.debug(`Failed to delete archive: ${error}`);
}
}
@@ -68,7 +54,7 @@ index dd31592..cbe378a 100644
});
}
exports.restoreCache = restoreCache;
@@ -144,6 +153,7 @@ function saveCache(paths, key, options) {
@@ -138,6 +140,7 @@ function saveCache(paths, key, options) {
const archiveFolder = yield utils.createTempDirectory();
const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod));
core.debug(`Archive Path: ${archivePath}`);
@@ -76,15 +62,15 @@ index dd31592..cbe378a 100644
try {
yield tar_1.createTar(archiveFolder, cachePaths, compressionMethod);
if (core.isDebug()) {
@@ -151,6 +161,7 @@ function saveCache(paths, key, options) {
@@ -145,6 +148,7 @@ function saveCache(paths, key, options) {
}
const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
+ savedEntry.size = archiveFileSize;
core.debug(`File Size: ${archiveFileSize}`);
if (archiveFileSize > fileSizeLimit) {
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
@@ -167,7 +178,7 @@ function saveCache(paths, key, options) {
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
if (archiveFileSize > fileSizeLimit && !utils.isGhes()) {
@@ -176,8 +180,15 @@ function saveCache(paths, key, options) {
core.debug(`Failed to delete archive: ${error}`);
}
}
@@ -93,3 +79,12 @@ index dd31592..cbe378a 100644
});
}
exports.saveCache = saveCache;
+class CacheEntry {
+ constructor(key, size) {
+ this.key = key;
+ this.size = size;
+ }
+}
+exports.CacheEntry = CacheEntry;
//# sourceMappingURL=cache.js.map
\ No newline at end of file

View File

@@ -1,2 +1 @@
- [FIX] - Upgrade `minimist` from `1.2.5` -> `1.2.6`
- [FIX] - Support cache entries > 2Gb via library upgrade to `@actions/cache` from `1.0.10` -> `2.0.0`.
[FIX] Save/restore exploded Gradle dist rather than zip

View File

@@ -294,6 +294,28 @@ export class GradleHomeEntryExtractor extends AbstractEntryExtractor {
super(gradleUserHome, 'gradle-home')
}
async extract(listener: CacheListener): Promise<void> {
await this.deleteWrapperZips()
return super.extract(listener)
}
/**
* Delete any downloaded wrapper zip files that are not needed after extraction.
* These files are cleaned up by Gradle >= 7.5, but for older versions we remove them manually.
*/
private async deleteWrapperZips(): Promise<void> {
const wrapperZips = path.resolve(this.gradleUserHome, 'wrapper/dists/*/*/*.zip')
const globber = await glob.create(wrapperZips, {
implicitDescendants: false,
followSymbolicLinks: false
})
for (const p of await globber.glob()) {
cacheDebug(`Deleting wrapper zip: ${p}`)
tryDelete(p)
}
}
/**
* Return the extracted cache entry definitions, which determine which artifacts will be cached
* separately from the rest of the Gradle User Home cache entry.
@@ -304,13 +326,19 @@ export class GradleHomeEntryExtractor extends AbstractEntryExtractor {
patterns: string[],
bundle: boolean
): ExtractedCacheEntryDefinition => {
const resolvedPattern = patterns.map(x => path.resolve(this.gradleUserHome, x)).join('\n')
return new ExtractedCacheEntryDefinition(artifactType, resolvedPattern, bundle)
const resolvedPatterns = patterns
.map(x => {
const isDir = x.endsWith('/')
const resolved = path.resolve(this.gradleUserHome, x)
return isDir ? `${resolved}/` : resolved // Restore trailing '/' removed by path.resolve()
})
.join('\n')
return new ExtractedCacheEntryDefinition(artifactType, resolvedPatterns, bundle)
}
return [
entryDefinition('generated-gradle-jars', ['caches/*/generated-gradle-jars/*.jar'], false),
entryDefinition('wrapper-zips', ['wrapper/dists/*/*/*.zip'], false),
entryDefinition('wrapper-zips', ['wrapper/dists/*/*/'], false), // Entire wrapper directory cached together
entryDefinition('java-toolchains', ['jdks/*.zip', 'jdks/*.tar.gz'], false),
entryDefinition('dependencies', ['caches/modules-*/files-*/*/*/*/*'], true),
entryDefinition('instrumented-jars', ['caches/jars-*/*'], true),