Commit graph

337 commits

Author SHA1 Message Date
Marcono1234
8be796e9fa Update link to 'update checksums' workflow 2024-04-16 10:06:09 -06:00
daz
0325d99e52 Workflow fixes
- Fix typo in 'paths-ignore'
- Add back 'buildDistribution' to demo job summary
2024-04-12 10:34:50 -06:00
daz
5893d44739
Use fixed job name for cache restore 2024-04-12 00:38:28 -06:00
daz
fb14e0ee5b Skip the 'download-dist' step for full integ-test
After the '[bot] update dist directory' commit, we run a full test suite.
This will now use the content from the 'dist' directory, rather than
regenerating this content in the test.
2024-04-12 00:24:44 -06:00
daz
0261d93071
Switch back to unique cache entries with full integ-test 2024-04-11 23:00:25 -06:00
daz
7d97cfadb0
Avoid most workflows when only 'dist' has changed 2024-04-11 22:54:09 -06:00
daz
ebf9707dff Use a bot token to generate "Update dist" commit
This will permit workflows to run when this commit is applied.

- Avoid running ci-update-dist for modifications to dist directory (no recursion)
- Run full-suite only in response to bot updates.
2024-04-11 22:44:13 -06:00
daz
0627979b9c Only allow one integ-test at a time per branch 2024-04-11 22:44:13 -06:00
daz
62557f3635
Enable wrapper validation with setup-gradle action 2024-04-11 11:56:55 -06:00
daz
39cecc54d0
Add wrapper-validation workflows 2024-04-11 08:39:21 -06:00
daz
3252e655d0
Ensure each integ-test gets a unique cache-key-prefix 2024-04-10 20:07:14 -06:00
daz
be0b7f44a7
Temporarily disable cache prefixing in integ tests
This is an attempt to stabilize our CI workflows.
2024-04-10 19:49:08 -06:00
Philip Wedemann
0f427bc07b
Add a test for merging existing toolchains.xml (#151) 2024-04-10 17:20:36 -06:00
daz
30a2ee13f2
Skip certain tests when running from fork 2024-04-10 17:05:09 -06:00
daz
d37a479015
Use pull_request triggers primarily for workflows
Instead of relying on push triggers in general, we now use pull_request
and reserve push triggers for main and release branches.

This makes the behaviour more consistent for users contributing from
repository forks. However, we no longer have a quick-feedback loop
for development.
2024-04-10 16:48:14 -06:00
daz
3e155e3d92
Avoid running incompatible tests on Windows 2024-04-10 13:11:19 -06:00
daz
b2fd266e89
List changed files when failing due to dist directory change
Hopefully this will help track down spurious failures.
2024-04-10 11:36:05 -06:00
daz
0be451eca3
Simplify the workflow triggers 2024-04-10 11:09:42 -06:00
daz
7b822e51a5
Merge quick and full tests into single workflow
- Run quick suite for Dependabot
- Run quick suite in forks
- Run quick suite if no PR is associated with commit
- Otherwise run full suite
2024-04-10 09:50:15 -06:00
daz
9e47918adf Build and commit changes to 'dist' automatically
Instead of requiring that developers keep the 'dist' directory up-to-date,
this process is now automated via a workflow.
Whenever a commit is pushed to 'main' (or a 'release/**' branch), the workflow will
build the application and commit any changes to the 'dist' directory.
2024-04-10 07:33:46 -06:00
daz
b64dafb1c9 Use locally built dist for demo workflows 2024-04-10 07:33:46 -06:00
daz
153b1135d0
Remove old workflow 2024-04-10 06:58:06 -06:00
daz
211d342ee6
Rename workflow 2024-04-10 06:57:13 -06:00
daz
6599acbe46
Add back dependency-review.yml so we can rename it 2024-04-10 06:55:58 -06:00
daz
e7c0080dc5
Remove old workflows 2024-04-10 06:52:39 -06:00
daz
0979245ebd
Rename 'check' workflows to 'integ-test' 2024-04-10 06:50:04 -06:00
daz
73638aa351
Run quick-check only if commit is NOT part of a PR
Without a mechanism to check this in the workflow trigger,
we instead run the workflow but skip all jobs if the commit belongs to a PR.

This effectively means that commits-without-PR will run quick-check, and commits-with-PR
will run full-check.
2024-04-10 06:39:42 -06:00
daz
d28f25d60a
Cache npm 2024-04-10 06:04:32 -06:00
daz
8bac4a819c
Split out check-and-unit-test into separate workflow 2024-04-10 06:01:23 -06:00
daz
bd3d4b0246
Check for secrets when running tests that require them 2024-04-10 05:47:43 -06:00
daz
667e034cd9
Split out test that requires DV access key 2024-04-10 05:46:20 -06:00
daz
cd54673221
Use runner-os consistently in integ-tests 2024-04-10 05:46:19 -06:00
daz
0ebfbb8f41
Always build 'dist' directory for integ-tests 2024-04-10 05:06:37 -06:00
daz
9169d36880
Consolidate 'dependency-submission' tests into integ-test workflow 2024-04-10 05:00:05 -06:00
daz
63fcfbfe27
Disable fail-fast for integ tests 2024-04-09 16:07:32 -06:00
daz
92975d7f32
Allow a task name to be specified for dependency-submission
Fixes: #125
2024-04-09 08:46:20 -06:00
Daz DeBoer
e235596c88
Only process build results once (#133)
On long-lived machines, it's possible that the `.build-results` directory isn't cleared between invocations. This will result in the job summary including results from previous jobs.

By marking each build-results file as 'processed' at the end of the job, we can avoid this scenario.
2024-04-08 19:44:46 -06:00
daz
a9dc5dee4e
Bump to CCUD plugin v2.0 everywhere 2024-04-07 22:42:14 -06:00
daz
ab471b0c20
Better test coverage for 'dependency-submission'
- Add 'dependency-submission' failure cases
- Add dependency-submission to job summary demo
- Fix permissions for dependency review
2024-04-07 16:57:18 -06:00
daz
90bf65c87c
Generated graph is submitted immediately by dependency-submission action
While `setup-gradle` must wait until the end of job to submit all of the generated
graphs, the `dependency-submission` action will not save/upload the generated graph
immediately, in the same step where it is generated.
2024-04-07 16:57:18 -06:00
daz
38a821729e
Use consistent action params between setup-gradle and dependency-submission
To ensure expected caching (and other) behaviour, we should keep these config
parameters as consistent as possible.
2024-04-07 12:11:50 -06:00
daz
ed4d086d37
Make dependency-submission and setup-gradle play nicely
Now, a `dependency-submission` step will trigger a dependency-graph
generation, even if it follows a `setup-gradle` step in the workflow.

Similarly, a `setup-gradle` step with `dependency-graph` configured
will function as expected even if it follows a `setup-gradle` step.
2024-04-06 19:31:07 -06:00
daz
ebf4d13461
Convert dependency-submission action to Typescript
Instead of being a thin wrapper over `setup-gradle`, the `dependency-submission`
action is now a fully-fledged action sharing implementation with `setup-gradle`.
2024-04-06 19:31:04 -06:00
daz
d71ecafebf
Minor test reorg 2024-04-06 16:00:53 -06:00
daz
1390ca6454
Don't rely on preinstalled gradle for test 2024-04-06 14:52:02 -06:00
daz
a3f366ddb7
Replace 'download-dist' action with 'init-integ-test'
This action takes care of 'setup-java' as well as downloading the dist if required.
2024-04-06 14:52:02 -06:00
daz
340a6438d0 Add 'setup-java' step to all examples 2024-04-05 14:54:29 -06:00
daz
518b14b196
Switch from com.gradle.enterprise to com.gradle.develocity 2024-04-03 19:05:27 -06:00
Pavlo Shevchenko
5a171ce5b8
Inject Develocity plugin for versions 3.17 and above (#62)
To handle the rebranding of the GE plugin, this PR updates the inject-develocity init script 
to apply the `com.gradle.develocity` plugin if `3.17+` version of the plugin is requested.
2024-04-03 14:47:50 -06:00
daz
cc54166e15 Truncate long values in job summary table
Fixes #35
2024-04-01 12:24:45 -06:00
daz
393df4bfa2 Bump to Gradle 8.7 2024-03-23 09:32:57 -06:00
daz
cee9fbd6e2
Bump CCUD plugin to 1.13 2024-03-12 16:13:40 +13:00
daz
e2b14c9dfc
Run full-check on action.yml change 2024-02-13 13:10:30 -07:00
daz
b61dbd2545
Test no dependency-graph for failing build 2024-02-12 22:03:45 -07:00
daz
4b284311c3
Disable cache debug logging for workflows
This logging can now be enabled on a case-by-case basis using
GitHub Actions debugging.
2024-02-11 18:00:40 -07:00
Daz DeBoer
b776693a71
Fail nicely when dependency-submission is used after setup-gradle in the same Job (#37)
Previously, this would fail with a hard-to-diagnose error message.

Fixes #14
2024-02-08 23:16:54 -07:00
daz
2f23d645f2
Warn and make Gradle Wrapper script executable
Instead of failing the build, detect a non-executable wrapper file
and set the executable bit.

Fixes #17
2024-02-08 22:26:12 -07:00
daz
9c837ee543
Test dependency-submission with gradle versions 2024-02-08 21:55:52 -07:00
Goooler
bc07b88bc0 Update Gradle 8.6 rc refs to the final version
https://github.com/gradle/gradle/releases/tag/v8.6.0

Signed-off-by: Goooler <wangzongler@gmail.com>
2024-02-08 21:38:25 -07:00
daz
0ac0f49dd2
Replace 'v3-beta' with 'v3' in docs 2024-01-29 10:46:26 -07:00
daz
11fb430abc
Update dependency-submission parameter for consistency
Instead of using 'dependency-graph-action' with some slightly better
values, we now use 'dependency-graph' as the parameter name with a subset
of the options available to 'setup-gradle'.
2024-01-29 10:46:26 -07:00
daz
bdb2b520ea
Remove unnecessary workflows 2024-01-28 10:13:13 -07:00
daz
e833c3f088
Bump DV plugin version to 3.16.2 2024-01-26 12:58:26 -07:00
daz
f218f2e104
Prefer 'setup-gradle' to 'gradle-build-action' 2024-01-25 12:46:51 -07:00
daz
a628cf9f2e
Replace occurrances of gradle-build-action
- Mostly with `setup-gradle`
- Some with `gradle-actions`
2024-01-25 12:36:53 -07:00
daz
930d449ff7
Merge in gradle-build-action as setup-gradle
This brings the entire codebase and history of `gradle/gradle-build-action` into
the `gradle/actions` repository, after some modifications to make it easier to
merge.

This will permit the new `gradle/actions/setup-gradle` coordinates to carry on
where `gradle/gradle-build-action` leaves off.

- All NPM sources have been moved into a 'sources' directory
- The main action.yml and README are not located at `setup-gradle`
2024-01-25 12:00:10 -07:00
daz
2e7b28666d
Move top-level action to 'setup-gradle' 2024-01-25 11:53:44 -07:00
daz
151423cc90
Verify outputs on gradle-build-action branch 2024-01-25 11:53:44 -07:00
daz
22e5c984e7
Update workflows for move to 'sources' 2024-01-25 11:53:44 -07:00
dependabot[bot]
e1ada08a9a
Bump the github-actions group with 1 update (#1047)
Bumps the github-actions group with 1 update:
[gradle/gradle-build-action](https://github.com/gradle/gradle-build-action).

Updates `gradle/gradle-build-action` from 2.11.1 to 2.12.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/gradle/gradle-build-action/releases">gradle/gradle-build-action's
releases</a>.</em></p>
<blockquote>
<h2>v2.12.0</h2>
<p>Adds a new option to clear a previously submitted
dependency-graph.</p>
<pre lang="yaml"><code>steps:
- uses: gradle/gradle-build-action@v2
  with:
    dependency-graph: clear
</code></pre>
<p>This may prove useful when migrating to a workflow using the upcoming
<code>gradle/actions/dependency-submission</code> action.</p>
<p><strong>Full-changelog</strong>: <a
href="https://github.com/gradle/gradle-build-action/compare/v2.11.1...v2.12.0">https://github.com/gradle/gradle-build-action/compare/v2.11.1...v2.12.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a8f75513ea"><code>a8f7551</code></a>
Build outputs</li>
<li><a
href="9283312acb"><code>9283312</code></a>
Add new option to clear dependency-graph</li>
<li><a
href="7c8a278ea0"><code>7c8a278</code></a>
Remove old clear-dependency-graph action</li>
<li><a
href="d8ca9b7d2e"><code>d8ca9b7</code></a>
Do full checks on release branches</li>
<li>See full diff in <a
href="https://github.com/gradle/gradle-build-action/compare/v2.11.1...v2.12.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=gradle/gradle-build-action&package-manager=github_actions&previous-version=2.11.1&new-version=2.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-25 10:21:22 -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
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
46878035be
Do full checks on release branches 2024-01-23 15:26:51 -07:00
daz
d731f29856
Use separate steps in composite action 2024-01-22 11:13:02 -07:00
daz
23b4b1d03b
Add 'dependency-graph-action' input param 2024-01-22 11:02:29 -07:00
daz
4b660dc33e
Add initial composite actions with smoke tests
These actions simply delegate to `gradle/gradle-build-action`

- `setup-gradle`: As `gradle-build-action` without the execution capability.
- `dependency-submission`: Submits a dependency graph for the project.
2024-01-16 09:49:44 -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
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
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
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
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
daz
72abd931ce
Set workflow permissions where required 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
a4dabb3a70
Adapt dependency-graph support for new artifact API
- Don't upload artifacts when using 'generate-and-submit'
- New option 'generate-and-upload' to be used with 'download-and-submit'
- Use Artifact API for downloading in the same and different workflow
2023-12-23 21:24:11 -07:00
dependabot[bot]
14b4921945
Bump the github-actions group with 3 updates
Bumps the github-actions group with 3 updates: [github/codeql-action](https://github.com/github/codeql-action), [gradle/gradle-build-action](https://github.com/gradle/gradle-build-action) and [actions/upload-artifact](https://github.com/actions/upload-artifact).


Updates `github/codeql-action` from 2 to 3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

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

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

---
updated-dependencies:
- dependency-name: github/codeql-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-minor
  dependency-group: github-actions
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-23 18:25:51 -07:00
daz
9c7269b85b
Update to latest Develocity plugins 2023-12-23 18:25:50 -07:00
daz
df38ec05e0
Use 'release-nightly' for config-cache test
Config-cache save/restore is dependent on Gradle 8.6.
Use of the release-nightly is temporary until 8.6 is released.
2023-12-23 12:21:19 -07:00
daz
38785d7d62
Update integ test for config-cache caching
- Rename test for clarity
- Use cache-encryption-key in config-cache test
2023-12-22 12:52:09 -07:00
daz
334a4b8d4d
Reinstate configuration-cache save/restore capability 2023-12-20 17:31:01 -07:00
daz
9d6738618d
Support wildcards in cache-excludes 2023-12-20 10:05:25 -07:00
dependabot[bot]
76d5a9b475
Bump the github-actions group with 2 updates
Bumps the github-actions group with 2 updates: [actions/setup-java](https://github.com/actions/setup-java) and [gradle/gradle-build-action](https://github.com/gradle/gradle-build-action).


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

Updates `gradle/gradle-build-action` from 2.9.0 to 2.10.0
- [Release notes](https://github.com/gradle/gradle-build-action/releases)
- [Commits](https://github.com/gradle/gradle-build-action/compare/v2.9.0...v2.10.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  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-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 19:23:45 -07:00