Commit graph

1129 commits

Author SHA1 Message Date
Daz DeBoer
a7f880172e
Use a released version of 'gradle-build-action' for our CI job 2022-06-05 09:06:23 -06:00
Daz DeBoer
e644288a42
Use build-results file for root project dirs
Instead of using a separate mechanism and init script, reuse the information
captured in the build-results file.
2022-06-05 08:34:07 -06:00
Daz DeBoer
e234151ec9
Add more information to captured build results
- Root project dir: will allow us to replace project-root-capture init script
- Gradle home dir: will allow us to stop all started daemons
2022-06-05 08:18:25 -06:00
Daz DeBoer
44e1837ae3
Merge pull request #304 from gradle/dd/test-init-scripts
Improve init scripts and add test coverage

The build-scan-capture init script will now capture results from builds that do not publish a build-scan, with and without the configuration-cache.

Fixes #292
2022-06-05 00:36:03 -06:00
Daz DeBoer
b400dc555d
Build outputs 2022-06-05 00:32:29 -06:00
Daz DeBoer
3f2d9cde44
Capture build results when GE plugin is applied but no build-scan is published 2022-06-05 00:32:29 -06:00
Daz DeBoer
6001bc9edc
Improve build badgee for builds without scan links 2022-06-05 00:32:00 -06:00
Daz DeBoer
5203a0b09d
Capture build results when config-cache is enabled
When enabled, the configuration-cache will cause the build to fail when a
`buildFinished` listener is added. Instead, use a BuildService to listen for task
failures and to write the results on build completion.
2022-06-05 00:29:42 -06:00
Daz DeBoer
500607bc35
Capture build-results without build-scan publication
The `buildScanPublished` is only called when a build scan is published by the build.
Support other invocations by adding a `buildFinished` listener.
2022-06-05 00:28:24 -06:00
Daz DeBoer
754892d4ae
Add workflow to run init-script tests 2022-06-05 00:27:36 -06:00
Daz DeBoer
ea24a0ad75
Add test coverage for build-result-capture init script 2022-06-05 00:27:36 -06:00
Daz DeBoer
748dc30fdc
Support and test Gradle 3.5.1
Fix build-scan-capture.init.gradle so that it applies to versions 3.+,
and include this version in test coverage.
2022-06-05 00:26:21 -06:00
Daz DeBoer
e4ed35bcaf
Add test for project-root-capture.init.gradle 2022-06-05 00:25:42 -06:00
Daz DeBoer
ece69c52b2
Save project-root-list in RUNNER_TEMP dir
This feels better than saving in Gradle User Home and is consistent
with where the build results are written.
2022-06-05 00:24:57 -06:00
Daz DeBoer
14c898b500
Merge pull request #149 from gradle/write-from-default-branch
Default to `cache-read-only` for non-default branches
2022-06-04 11:45:42 -06:00
Daz DeBoer
00cdd4dcf9
Explicitly allow cache-write for test invocations
The `gradle-build-action` test workflows need to write cache entries,
even when run on non-default branches. This change add explicit configuration
to set `cache-read-only: false` when cache writing is required.
2022-06-04 11:39:19 -06:00
Daz DeBoer
b02f4f1968
Disable cache-read-only when cache-write-only is set 2022-06-04 11:28:12 -06:00
Daz DeBoer
0a36ca9fb8
Use 'cache-read-only' for all but default_branch
Cache entries _written_ from jobs run on a non-default branch will be private
to other jobs for that branch. When development flow involves working on a
feature branch and then merging into 'main', these branch-private cache
entries can result in eviction of other (shared) cache entries generated
for the default branch.

With this change, we make the recommended setup the default, by running
with `cache-read-only: true` for any jobs run on a non-default branch.
These jobs will be able to read cache entries written from the main branch,
but will not write any cache entries.

Fixes #143
2022-06-04 11:19:07 -06:00
Daz DeBoer
fe92974cdf
Merge pull request #303 from gradle/dd/improved-summary
Improve layout and formatting of Job Summary
2022-06-04 11:04:38 -06:00
Daz DeBoer
6aa41b32df
Build outputs 2022-06-04 10:57:25 -06:00
Daz DeBoer
4fa0803854
Improve layout and formatting of Job Summary
- Move entire caching summary into details section
- Use core.summary.addTable for all table creation
- Include cache status in clickable description
2022-06-04 10:55:26 -06:00
Daz DeBoer
9ab4abd18c
Update to latest version of all github actions 2022-06-04 09:26:11 -06:00
paul
f375a232f2
Add .nvmrc 2022-06-04 09:10:03 -06:00
Daz DeBoer
85daf96c6d
Update development dependencies
- Bump typescript from 4.7.2 to 4.7.3
- Bump ts-jest from 28.0.3 to 28.0.4
- Added @types/jest which is now required
- Bump eslint from 8.16.0 to 8.17.0
2022-06-04 09:07:11 -06:00
Daz DeBoer
8b56c4af06
Merge pull request #302 from gradle/fix-config-cache
Fix save/restore of configuration-cache
2022-06-04 08:57:34 -06:00
Daz DeBoer
4da299730b
Build outputs 2022-06-03 13:51:36 -06:00
Daz DeBoer
dff0fe1b20
Remove debug output from init script 2022-06-03 13:51:36 -06:00
Daz DeBoer
ae74c01440
Use a BuildService to always collect project root
Using `settingsEvaluated` meant that the project root was not recorded
when the build was run with a config-cache hit. This meant that the subsequent
build would not restore the config-cache, resulting in a cache miss.

In order to avoid issues running the init script on older versions of Gradle
the project-collection is extracted into a separate groovy file that is only
applied conditionally on Gradle 7 or higher.
2022-06-03 13:51:36 -06:00
Daz DeBoer
cde0632795
Update comment for accuracy 2022-06-03 07:50:08 -06:00
Daz DeBoer
6cc033f2b3
Make build-result-capture script compatible with config-cache 2022-06-03 07:12:23 -06:00
Daz DeBoer
8aaf080d68
Merge pull request #296 from gradle/dependabot/npm_and_yarn/typescript-eslint/parser-5.27.0
Bump @typescript-eslint/parser from 5.26.0 to 5.27.0
2022-06-03 05:59:16 -06:00
Daz DeBoer
4378b83ae3
Merge pull request #295 from gradle/dependabot/npm_and_yarn/eslint-plugin-jest-26.4.6
Bump eslint-plugin-jest from 26.2.2 to 26.4.6
2022-06-03 05:58:56 -06:00
Daz DeBoer
d3a78eb55f
Merge pull request #298 from gradle/job-summary-table
Add improved Job Summary with build results and caching report
2022-06-02 23:19:52 -06:00
Daz DeBoer
f4d1e351c0
Build outputs 2022-06-02 23:17:50 -06:00
Daz DeBoer
7b79b2a752
Report on read-only / write-only cache 2022-06-02 23:16:52 -06:00
Daz DeBoer
143774290e
Add more details to cache summary report 2022-06-02 22:39:55 -06:00
Daz DeBoer
a9a5bcf180
Move writing of cache report into job-summary.ts 2022-06-02 22:39:09 -06:00
Daz DeBoer
f9c8fcf79f
Adding caching details to Job Summary 2022-06-02 14:21:10 -06:00
Daz DeBoer
86e82987ba
Write job summary in post action
- Save build results in file encoded as JSON
- Read all build results in post action and render as table in job summary
2022-06-02 12:58:49 -06:00
Daz DeBoer
5fe4df6233
Merge pull request #297 from gradle/extract-init-scripts
Extract init scripts and state tracking
2022-06-02 12:43:26 -06:00
Daz DeBoer
d79b3ba8ae
Build outputs 2022-06-02 12:25:11 -06:00
Daz DeBoer
8f3c97e3f1
Extract action state-tracking out of caches.ts 2022-06-02 12:20:01 -06:00
Daz DeBoer
d95713bd5d
Extract init scripts into resource files 2022-06-02 11:53:33 -06:00
Daz DeBoer
bdf9736c53
Add 'npm check' goal to run lint without generating outputs 2022-06-02 11:53:05 -06:00
Daz DeBoer
7e85212f59
Add workflow with several Gradle builds to demo job summary 2022-06-02 11:52:52 -06:00
dependabot[bot]
0c692feedb
Bump @typescript-eslint/parser from 5.26.0 to 5.27.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.26.0 to 5.27.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.27.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-05-30 22:20:55 +00:00
dependabot[bot]
78da7b9646
Bump eslint-plugin-jest from 26.2.2 to 26.4.6
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 26.2.2 to 26.4.6.
- [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.2.2...v26.4.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 22:20:40 +00:00
Daz DeBoer
992ccebeea
Only run main workflows when relevant files change 2022-05-29 17:27:11 -06:00
Daz DeBoer
c13dc6c789
Fix and re-enable test for save/restore config-cache 2022-05-29 17:27:11 -06:00
Daz DeBoer
5e6af67a5e
Fix CI-full-check for renamed workflow 2022-05-29 15:05:31 -06:00