Commit graph

1094 commits

Author SHA1 Message Date
Daz DeBoer
800e52f373
Run all tests on macos-latest 2022-02-03 09:11:06 -07:00
Daz DeBoer
6dd3b19f8f
Update to @types/node:v16.11.21 2022-01-31 14:14:53 -07:00
Daz DeBoer
6f4fa19a5b
Update to @typescript-eslint/parser@5.10.2 2022-01-31 14:10:03 -07:00
dependabot[bot]
d97141a29c Bump eslint from 8.7.0 to 8.8.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.7.0 to 8.8.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.7.0...v8.8.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-01-29 08:27:03 -07:00
Daz DeBoer
bc3340afc5
Tell dependabot to ignore @types/node 2022-01-27 09:07:17 -07:00
Daz DeBoer
5f1def5815
Enable dependabot updates 2022-01-27 08:43:59 -07:00
Daz DeBoer
5a7191522f
Merge pull request #144 from gradle/npm-hygiene
Perform NPM hygiene
2022-01-27 08:36:38 -07:00
Daz DeBoer
893f0e10c7
Build outputs 2022-01-27 08:23:46 -07:00
Daz DeBoer
d5e58c8a04
Update many NPM dependencies to newer versions 2022-01-27 08:23:14 -07:00
Daz DeBoer
2920a48bbc
Run npm audit fix
This updates 'node-fetch' to a version without CVE
2022-01-27 08:22:45 -07:00
Daz DeBoer
1904e7e80d
Upgradle to use node v16 2022-01-27 08:22:29 -07:00
Daz DeBoer
702bb97ecb
Do not overwrite existing gradle.properties 2022-01-24 15:18:11 -07:00
Daz DeBoer
b9c806c75d
Fix example in action.yml 2022-01-24 15:08:55 -07:00
Daz DeBoer
d2799e6f98
Merge pull request #142 from gradle/strict-cache-match
Improves logging for caching, and adds 2 experimental cache options:

- `gradle-home-cache-strict-match`: Avoid re-using a Gradle Home cache entry written by a different job. Only cache entries written by the current Job will be used.
- `cache-write-only`: Do not restore existing cache entries, but still save cache entries in post-action.  Fixes #141.
2022-01-24 12:56:25 -07:00
Daz DeBoer
2734714920
Build outputs 2022-01-21 08:09:33 -07:00
Daz DeBoer
f75a3e8436
Make build-scan notice a WARNING for failed builds 2022-01-21 08:09:32 -07:00
Daz DeBoer
c349fa5b1f
Do not hide ReserveCacheError failures
When the target entry already exists, we are unable to save. Ensuring this situation
is logged helps make the logs more understandable.
2022-01-21 08:08:32 -07:00
Daz DeBoer
08d5b40ca5
Add experimental support for 'cache-write-only'
There may be cases where it a "fresh" cache entry would be beneficial,
for example if the Gradle User Home cache entry grows over time.

This setting would run the build as if no prior cache entry exists.
2022-01-20 15:04:11 -07:00
Daz DeBoer
0a5ede19a9
Improve cache-reporting when entry already exists 2022-01-20 15:04:11 -07:00
Daz DeBoer
a23ac1d61c
Add experimental support for 'strict-match' caching
By default, the action will attempt to restore a Gradle User Home
cache entry from a different set of matrix inputs (or a different Job entirely)
if an existing entry is not found for the current Job (including matrix inputs).

By specifying the experimental `gradle-home-cache-strict-match` parameter, a user
can avoid this fuzzy matching and ensure that a job execution starts with an
empty Gradle User Home if no entry from a prior execution is found.
2022-01-20 15:03:54 -07:00
Daz DeBoer
a8da4e5ca3
Merge pull request #140 from gradle/cache-disable
Fix Build Scan capture when cache is disabled

With the change to use init-scripts to inject Build Scan capture, this functionality broke when caching was disabled and Gradle User Home wasn't initialized.

This PR fixes a couple of issues and ensures that the Gradle User Home is initialized even when it is not restored from the GitHub Actions cache.

Fixes #138 
Fixes #139
2022-01-19 11:31:29 -07:00
Daz DeBoer
4f616f683a
Include github.run_attempt in test cache keys
This change to the integration tests should properly isolate multiple runs of the same job.
Previously, some jobs would fail if you attempted to re-run them via the UI, because the cache
entries would be re-used from the previous run.
2022-01-18 10:52:22 -07:00
Daz DeBoer
222b714890
Build outputs 2022-01-17 14:44:32 -07:00
Daz DeBoer
7dee0f45c2
Fix check for pre-existing Gradle User Home 2022-01-17 14:44:32 -07:00
Daz DeBoer
50ca2bca83
Improve messages for cache-disabled scenario 2022-01-17 14:44:32 -07:00
Daz DeBoer
3aa7bfe163
Initialize pre-existing Gradle User Home 2022-01-17 14:44:32 -07:00
Daz DeBoer
755aebc7d1
Test build-scan capture with pre-existing GUH 2022-01-17 14:44:31 -07:00
Daz DeBoer
06d64212d3
Initialize the Gradle User Home even when caching is disabled 2022-01-17 14:29:11 -07:00
Daz DeBoer
97a4d7a5fd
Test build-scan capture works with cache-disabled 2022-01-17 14:29:11 -07:00
Daz DeBoer
a7260b277e
Specify mandatory 'distribution' arg for setup-java 2022-01-17 14:28:53 -07:00
Daz DeBoer
f4e053dda1
Upgrade to reference actions/setup-java@v2
- Update all references in README.md
- Update version used in `pr-build-scan-comment`
- Discourage the use of `cache: gradle` with `setup-java@v2`
2022-01-16 16:18:09 -07:00
Benedikt Ritter
a7c463b44a
Update to latest version of actions/github-script
See https://github.com/marketplace/actions/github-script#breaking-changes-in-v5

* Update docs to latest github-script action version
* Update CI build to latest GitHub API
2022-01-16 15:45:15 -07:00
Daz DeBoer
42faf281e6
Include names of requested tasks in build scan notice
This should make it easier to differentiate between build scan notices for different
Gradle invocations in the same Job.

Fixes: #124
2021-12-31 10:34:53 -07:00
Daz DeBoer
13d93c1ca1
Check executable bit on Gradle script
Fixes #76
2021-12-30 21:40:27 -07:00
Daz DeBoer
3edb3cb004
Reorder inputs in metadata file for v2.1 2021-12-30 18:16:51 -07:00
Daz DeBoer
3609b7787a
Polish README for v2.1 2021-12-30 18:12:37 -07:00
Daz DeBoer
f804351b51
Merge pull request #131 from gradle/cache-jdks
- Cache downloaded Java Toolchains
- Treat configuration-cache entries as extracted entries
2021-12-30 16:19:02 -07:00
Daz DeBoer
39e51526fb
Build outputs 2021-12-30 16:03:02 -07:00
Daz DeBoer
76ea8a76b2
Treat configuration-cache as an extracted entry
Instead of using a fallback strategy to locate a configuration-cache entry
based on the current job and git SHA, these entries are now keyed based on their
file content with the keys persisted in the primary Gradle User Home entry.

This removes the chance of having a configuration-cache entry restored that is
incompatible with the restored Gradle User Home state, and makes the logic easier
to understand.

This change involved a fairly major refactor, with the CacheEntryExtractor being
split out from the primary cache implementation, and adding a separate extractor
implementation for configuration-cache.
2021-12-30 16:03:02 -07:00
Daz DeBoer
12fc52a49a
Combine java-toolchain entry definitions
- Remove configuration parameter for cache-entry-definitions. This allows richer modelling of extracted entries.
- Include both *.zip and *.tar.gz in entry definition for java-toolchains.
2021-12-30 16:03:02 -07:00
Daz DeBoer
c157d0a332
Cache downloaded Java Toolchains
Due to limitations with the way extracted entries are defined, a separate entry
is defined for *nix and windows.

Fixes #33
2021-12-30 16:02:02 -07:00
Daz DeBoer
c61f5d87b4
Test java-toolchain cache 2021-12-17 21:10:31 -07:00
Daz DeBoer
c208b4c1f7
Test caching with gradle-plugin project 2021-12-17 20:54:04 -07:00
Daz DeBoer
b4e6c2b28a
Minor improvements to README 2021-12-17 13:34:22 -07:00
Daz DeBoer
b84b650c31
Merge pull request #130 from gradle/setup-gradle
Allow action to be used without Gradle execution
2021-12-17 13:08:36 -07:00
Daz DeBoer
eda0038770
Reduce the number of automated comments left on PR 2021-12-17 10:49:41 -07:00
Daz DeBoer
ed5b4ae5dc
Verify GUH restore combined with Gradle execution 2021-12-17 10:44:29 -07:00
Daz DeBoer
d50632cfd1
Build outputs 2021-12-17 10:29:59 -07:00
Daz DeBoer
40c0a12211
Update README for use without Gradle execution 2021-12-17 10:29:59 -07:00
Daz DeBoer
e977669c8c
Update most test workflows to separate config from execution 2021-12-17 10:29:59 -07:00