Commit graph

1148 commits

Author SHA1 Message Date
daz
2be01ca1c6
Build outputs 2024-01-25 10:00:43 -07:00
dependabot[bot]
a00827eebb
Bump the npm-dependencies group with 7 updates
Bumps the npm-dependencies group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact) | `2.0.0` | `2.1.0` |
| [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) | `3.2.2` | `3.2.3` |
| [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `6.17.0` | `6.19.1` |
| [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) | `27.6.1` | `27.6.3` |
| [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) | `5.1.2` | `5.1.3` |
| [prettier](https://github.com/prettier/prettier) | `3.1.1` | `3.2.4` |
| [ts-jest](https://github.com/kulshekhar/ts-jest) | `29.1.1` | `29.1.2` |

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

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

Updates `@typescript-eslint/parser` from 6.17.0 to 6.19.1
- [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/v6.19.1/packages/parser)

Updates `eslint-plugin-jest` from 27.6.1 to 27.6.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/v27.6.1...v27.6.3)

Updates `eslint-plugin-prettier` from 5.1.2 to 5.1.3
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.1.2...v5.1.3)

Updates `prettier` from 3.1.1 to 3.2.4
- [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.1.1...3.2.4)

Updates `ts-jest` from 29.1.1 to 29.1.2
- [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.1...v29.1.2)

---
updated-dependencies:
- dependency-name: "@actions/artifact"
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@actions/cache"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  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: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
  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-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-25 09:59:45 -07:00
dependabot[bot]
ad80850e98
Bump the github-actions group with 2 updates
Bumps the github-actions group with 2 updates: [actions/dependency-review-action](https://github.com/actions/dependency-review-action) and [gradle/gradle-build-action](https://github.com/gradle/gradle-build-action).

Updates `actions/dependency-review-action` from 3 to 4
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](https://github.com/actions/dependency-review-action/compare/v3...v4)

Updates `gradle/gradle-build-action` from 2.11.0 to 2.11.1
- [Release notes](https://github.com/gradle/gradle-build-action/releases)
- [Commits](https://github.com/gradle/gradle-build-action/compare/v2.11.0...v2.11.1)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: gradle/gradle-build-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-25 09:57:26 -07:00
daz
bd6d0a74d4
Configure explicit java version for config-cache test
The default JDK on some runners can have minor differences, resulting
in configuration-cache misses. Setting the Java version explicitly should
ensure consistency.
2024-01-25 09:21:52 -07:00
Daz DeBoer
1b6cac1f97
Make it easy to publish to scans.gradle.com (#1045) 2024-01-25 16:58:51 +01:00
daz
90d7c1a069
Apply TOS agreement even if plugin is already applied
Fixes #1044
2024-01-25 08:56:13 -07:00
daz
4062866f05
Document build scan publishing 2024-01-25 08:56:13 -07:00
daz
83a95864e5
Build outputs 2024-01-25 08:56:13 -07:00
daz
60c43cb563
Make it easy to publish to scans.gradle.com
- Allow init-script to publish to scans.gradle.com
- Add paramaters to enable build scan publishing
- Test coverage for build scan publishing
2024-01-25 08:56:13 -07:00
daz
75b3db10df
Remove node warnings from workflows
- Use setup-node to control Node version used to build
- Use Node20 compatible actions in custom actions
2024-01-24 16:01:15 -07:00
daz
f1361c71c2
Build outputs 2024-01-23 16:19:26 -07:00
daz
49ade81b5d
Add a new option to clear the dependency-graph
When changing workflow names or when changing to the new 'dependency-submission'
action, it can be useful to clear existing dependency graph snapshots from previous
submissions. While the old graphs will eventually "age out", the 'clear' option will
submit an empty dependency graph for an existing Job correlator, ensuring that old
dependency graphs don't linger.
2024-01-23 16:19:25 -07:00
daz
79fa674432
Remove old clear-dependency-graph action 2024-01-23 16:19:17 -07:00
daz
46878035be
Do full checks on release branches 2024-01-23 15:26:51 -07:00
daz
42452daeb5
Add explicit process.exit() to avoid wait for hanging promises
When using the `@actions/cache` library to save cache entries, it seems that one
or more Promises remain unresolved after the save completes.
With Node20 this causes a delay when exiting the process: the default behaviour
now wait for these Promises to complete. Adding an explicit `Process.exit()`
removes the delay, returning to the Node 16 behaviour.

Fixes #1038
2024-01-16 18:01:46 -07:00
daz
346645706f
Don't overwrite dependency-graph env vars
This allows these vars to be explicitly set, which is required for
testing (and could prove useful for debugging).
2024-01-16 09:43:56 -07:00
daz
5516b39940
Fix docs for dependency-graph param 2024-01-13 12:55:55 -07:00
Daz DeBoer
7099569988
Improve dependency graph failure handling (#1036)
One goal for the original dependency-graph support was to minimize it's
impact on existing workflows, by operating transparently and not
impacting the build outcome. This meant that any failures in
dependency-graph generation or submission were logged as warnings, but
did not cause the workflow to fail.

However, in some cases the primary purpose of a workflow is to generate
and submit a dependency graph: in these cases it is desirable to have
the workflow fail when this process breaks.

This PR introduces a new `dependency-graph-continue-on-failure`
parameter, which when `false` will enable the latter behaviour. It also
adds test coverage for different failures in dependency graph generation
and submission.

Fixes #1034 
Fixes #997
2024-01-13 15:32:28 +01:00
daz
610728fa8c
Build outputs 2024-01-13 07:21:40 -07:00
daz
a835cbb991
Use latest release of dependency-graph plugin 2024-01-13 07:21:40 -07:00
daz
ee4d92bb22
Document 'dependency-graph-continue-on-error' 2024-01-13 07:21:40 -07:00
daz
173b6ae553
Improve testing for dependency graph failures
- Update test to use input param
- Rename Job to indicate expected failure
2024-01-13 07:21:08 -07:00
daz
a01f794d92
Add dependency-graph-continue-on-failure input param
- Translate to env var for init-script support
- Use when deciding whether to log or rethrow errors
- Add a custom error type to trigger failure in post action
2024-01-13 07:20:45 -07:00
daz
369fcc54d8
Add tests for dependency graph failures 2024-01-13 07:20:45 -07:00
daz
6523a87c8f
Update supported Gradle versions to match plugin 2024-01-12 13:33:42 -07:00
daz
11693a1169
Run npm tasks concurrently 2024-01-12 07:22:24 -07:00
daz
0e6b90783e
Fix dependency-graph with configuration-cache
When state is reused from the configuration cache, no dependencies are resolved.
This fix prevents the action from submitting an empty dependency graph in this case.
2024-01-11 21:25:29 -07:00
Iurii Ignatko
932abbbe13
Update GE injection script for Develocity rename
- Rename all env vars expected by init-script: `s/GRADLE_ENTERPRISE/DEVELOCITY`
- Update README for changes
- Use `Develocity` consistently in tests
2024-01-10 20:30:40 -07:00
Daz DeBoer
1a18d0b2d3
Update description of cache key 2024-01-09 20:10:49 -07:00
Daz DeBoer
7af89832c5
Further improvements to Merge Queue docs 2024-01-08 13:00:48 -07:00
Daz DeBoer
b5ebb0cc96
Document caching with merge-queue 2024-01-08 12:58:38 -07:00
daz
3a75647ad4
Remove 'gradle-executable' input param 2024-01-04 13:53:16 -07:00
daz
4dda5928c7
Update CodeQL config to latest default 2024-01-04 13:03:33 -07:00
Daz DeBoer
6c7537229b
Merge pull request #1026 from gradle/dd/java-toolchains
Use Maven toolchains.xml to register pre-installed JDKs as java toolchains
2024-01-04 05:34:34 +01:00
daz
650620f9f9
Build outputs 2024-01-03 21:12:13 -07:00
daz
d4e24dfc10
Register pre-installed JDKs in .m2/toolchains.xml
Since adding these to the `org.gradle.java.installations.fromEnv` property
is problematic (#1024), this mechanism allows the default toolchains to
be discovered by Gradle via a different mechanism.

The default JDK installations are added to `~/.m2/toolchains.xml` such that
they are discoverable by Gradle toolchain support.
The `setup-java` action also writes to this file, so we merge with any existing
content: this allows both pre-installed and "setup" JDKs to be automatically
detected by Gradle.
2024-01-03 21:08:40 -07:00
daz
7c57ba1136
Remove writing value to gradle.properties in setup
The written property will override any project-level setting, which
can lead to confusing behaviour.

Fixes #1024
2024-01-03 18:49:57 -07:00
Daz DeBoer
32bab5b15a
Allow entries with same Job ID to match in different workflows
Previously, the workflow name was always included when matching a cache entry for the current job.
This can be overly restrictive when job definitions are shared between different workflows. 
The workflow name is still encoded in the cache entry key, but not in the restore key searching for entries with a matching job.

Fixes #1017
2024-01-03 18:38:36 -07:00
daz
270f30ba56
Always initialize encryption key 2024-01-02 14:28:29 -07:00
daz
c00a847f3f
Enable config-cache tests
- Enable in full-build
- Pass encryption key secret to test workflow
2024-01-02 11:31:06 -07:00
daz
e2aa3f332c
Test with Gradle 8.6-rc-1 2024-01-01 19:29:46 -07:00
dependabot[bot]
ff5d63e9dc
Bump the npm-dependencies group with 3 updates
Bumps the npm-dependencies group with 3 updates: [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser), [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) and [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier).

Updates `@typescript-eslint/parser` from 6.15.0 to 6.17.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/v6.17.0/packages/parser)

Updates `eslint-plugin-jest` from 27.6.0 to 27.6.1
- [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.6.0...v27.6.1)

Updates `eslint-plugin-prettier` from 5.1.1 to 5.1.2
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  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: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 17:54:53 -07:00
Daz DeBoer
4faac45dc8
Merge pull request #1021 from gradle/dd/pr-comment
Automatically add Job Summary as PR comment
2024-01-02 01:51:30 +01:00
daz
45ed60450e
Build outputs 2024-01-01 17:50:40 -07:00
daz
72abd931ce
Set workflow permissions where required 2024-01-01 17:50:40 -07:00
daz
a4107da76d
Warn when permissions not set for PR comment 2024-01-01 17:50:40 -07:00
daz
d16a3f4093
Update docs for PR comment 2024-01-01 17:50:40 -07:00
daz
333078158e
Allow job-summary only on failure
Instead of a binary true/false option, it is now possible to only add
a Job Summary when the build failed. This applies both to the overall
Job Summary added to the workflow run, and to the new PR comment feature.
2024-01-01 17:50:40 -07:00
daz
34a07dced0
Automatically add Job Summary as PR comment
Rather than requiring a separate step to add a PR comment,
the `gradle-build-action` can now automatically add the Job Summary
as a PR comment

Fixes #1020
2024-01-01 17:50:15 -07:00
daz
24e9e9dc6b
Refactor and simplify summary generation 2023-12-31 15:12:04 -07:00