mirror of
https://github.com/gradle/actions.git
synced 2026-06-12 14:40:39 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7704e13a8f | |||
| 8b6cdb5f58 | |||
| 5852e0e5d8 | |||
| 318eed7038 | |||
| a740661292 | |||
| 7ae0d0208c | |||
| e473973a5b | |||
| 35a4a3f355 | |||
| b6eebf33f1 | |||
| 9901393644 | |||
| 20ce680c89 |
@@ -26,7 +26,7 @@ jobs:
|
|||||||
cache-dependency-path: sources/package-lock.json
|
cache-dependency-path: sources/package-lock.json
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
# Use a released version to avoid breakages
|
# Use a released version to avoid breakages
|
||||||
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
|
uses: gradle/actions/setup-gradle@5e2ebd065dc2488b7a6ad670704656cbbe1e8f60 # v6.1.1
|
||||||
env:
|
env:
|
||||||
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ on:
|
|||||||
paths-ignore:
|
paths-ignore:
|
||||||
- 'dist/**'
|
- 'dist/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
|
||||||
- '.github/workflows/ci-init-script-check.yml'
|
|
||||||
- 'sources/src/resources/init-scripts/**'
|
|
||||||
- 'sources/test/init-scripts/**'
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@@ -23,16 +19,34 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
# Detect whether anything relevant to the init-script tests changed.
|
||||||
|
# The workflow always runs (so it always reports a status check, making it safe
|
||||||
|
# to mark as required), but the heavy steps below are skipped on pull requests
|
||||||
|
# that don't touch the init-scripts. Pushes and manual runs always execute fully.
|
||||||
|
- name: Check for relevant changes
|
||||||
|
id: changes
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
.github/workflows/ci-init-script-check.yml
|
||||||
|
sources/src/resources/init-scripts/**
|
||||||
|
sources/test/init-scripts/**
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
|
if: steps.changes.outputs.any_changed == 'true' || github.event_name != 'pull_request'
|
||||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 17
|
java-version: 17
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
|
if: steps.changes.outputs.any_changed == 'true' || github.event_name != 'pull_request'
|
||||||
# Use a released version to avoid breakages
|
# Use a released version to avoid breakages
|
||||||
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
|
uses: gradle/actions/setup-gradle@5e2ebd065dc2488b7a6ad670704656cbbe1e8f60 # v6.1.1
|
||||||
env:
|
env:
|
||||||
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
ALLOWED_GRADLE_WRAPPER_CHECKSUMS: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 # Invalid wrapper jar used for testing
|
||||||
- name: Run integration tests
|
- name: Run integration tests
|
||||||
|
if: steps.changes.outputs.any_changed == 'true' || github.event_name != 'pull_request'
|
||||||
working-directory: sources/test/init-scripts
|
working-directory: sources/test/init-scripts
|
||||||
run: ./gradlew check
|
run: ./gradlew check
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ jobs:
|
|||||||
needs: build-distribution
|
needs: build-distribution
|
||||||
uses: ./.github/workflows/suite-integ-test-caching.yml
|
uses: ./.github/workflows/suite-integ-test-caching.yml
|
||||||
concurrency:
|
concurrency:
|
||||||
group: CI-integ-test-caching
|
group: CI-integ-test-caching-${{ github.ref }}
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
with:
|
with:
|
||||||
skip-dist: false
|
skip-dist: false
|
||||||
@@ -40,7 +40,7 @@ jobs:
|
|||||||
needs: caching-integ-tests
|
needs: caching-integ-tests
|
||||||
uses: ./.github/workflows/suite-integ-test-other.yml
|
uses: ./.github/workflows/suite-integ-test-other.yml
|
||||||
concurrency:
|
concurrency:
|
||||||
group: CI-integ-test-other
|
group: CI-integ-test-other-${{ github.ref }}
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
with:
|
with:
|
||||||
skip-dist: false
|
skip-dist: false
|
||||||
@@ -52,8 +52,29 @@ jobs:
|
|||||||
needs: other-integ-tests
|
needs: other-integ-tests
|
||||||
uses: ./.github/workflows/suite-integ-test-dependency-submission.yml
|
uses: ./.github/workflows/suite-integ-test-dependency-submission.yml
|
||||||
concurrency:
|
concurrency:
|
||||||
group: CI-integ-test-dependency-submission
|
group: CI-integ-test-dependency-submission-${{ github.ref }}
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
with:
|
with:
|
||||||
skip-dist: false
|
skip-dist: false
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
# Aggregate gate: a single check that succeeds only when all integ-test jobs succeed.
|
||||||
|
# Require this one check in branch protection instead of every fanned-out matrix job.
|
||||||
|
integ-test-success:
|
||||||
|
if: ${{ always() }}
|
||||||
|
needs:
|
||||||
|
- build-distribution
|
||||||
|
- caching-integ-tests
|
||||||
|
- other-integ-tests
|
||||||
|
- dependency-submission-integ-tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Fail if any integ-test job failed or was cancelled
|
||||||
|
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
|
||||||
|
run: |
|
||||||
|
echo "One or more integ-test jobs did not succeed:"
|
||||||
|
echo " build-distribution: ${{ needs.build-distribution.result }}"
|
||||||
|
echo " caching-integ-tests: ${{ needs.caching-integ-tests.result }}"
|
||||||
|
echo " other-integ-tests: ${{ needs.other-integ-tests.result }}"
|
||||||
|
echo " dependency-submission-integ-tests: ${{ needs.dependency-submission-integ-tests.result }}"
|
||||||
|
exit 1
|
||||||
|
|||||||
@@ -12,6 +12,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||||
- uses: gradle/actions/wrapper-validation@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0
|
- uses: gradle/actions/wrapper-validation@5e2ebd065dc2488b7a6ad670704656cbbe1e8f60 # v6.1.1
|
||||||
with:
|
with:
|
||||||
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
allow-checksums: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
|
||||||
|
|||||||
+4
-4
@@ -11,16 +11,16 @@
|
|||||||
- Note: The gradle actions follow the GitHub Actions convention of including a .0 patch number for the first release of a minor version, unlike the Gradle convention which omits the trailing .0.
|
- Note: The gradle actions follow the GitHub Actions convention of including a .0 patch number for the first release of a minor version, unlike the Gradle convention which omits the trailing .0.
|
||||||
|
|
||||||
## Release gradle/actions
|
## Release gradle/actions
|
||||||
- Create a tag for the release. The tag should have the format `v5.0.0`
|
- Create a tag for the release. The tag should have the format `v6.2.0`
|
||||||
- From CLI: `git tag -s -m "v5.0.0" v5.0.0 && git push --tags`
|
- From CLI: `git tag -s -m "v6.2.0" v6.2.0 && git push --tags`
|
||||||
- Note that we sign the tag and set the commit message for the tag to the newly released version.
|
- Note that we sign the tag and set the commit message for the tag to the newly released version.
|
||||||
- Go to https://github.com/gradle/actions/releases and "Draft new release"
|
- Go to https://github.com/gradle/actions/releases and "Draft new release"
|
||||||
- Use the newly created tag and copy the tag name exactly as the release title.
|
- Use the newly created tag and copy the tag name exactly as the release title.
|
||||||
- Craft release notes content based on issues closed, PRs merged and commits
|
- Craft release notes content based on issues closed, PRs merged and commits
|
||||||
- Include a Full changelog link in the format https://github.com/gradle/actions/compare/v2.12.0...v3.0.0
|
- Include a Full changelog link in the format https://github.com/gradle/actions/compare/v2.12.0...v3.0.0
|
||||||
- Publish the release.
|
- Publish the release.
|
||||||
- Force push the `v5` tag (or current major version) to point to the new release. It is conventional for users to bind to a major release version using this tag.
|
- Force push the `v6` tag (or current major version) to point to the new release. It is conventional for users to bind to a major release version using this tag.
|
||||||
- From CLI: `git tag -f -s -a -m "v5.0.0" v5 && git push -f --tags`
|
- From CLI: `git tag -f -s -a -m "v6.2.0" v6 && git push -f --tags`
|
||||||
- Note that we sign the tag and set the commit message for the tag to the newly released version.
|
- Note that we sign the tag and set the commit message for the tag to the newly released version.
|
||||||
- Your HEAD must point at the commit to be tagged.
|
- Your HEAD must point at the commit to be tagged.
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,16 @@ inputs:
|
|||||||
type: string
|
type: string
|
||||||
|
|
||||||
dependency-resolution-task:
|
dependency-resolution-task:
|
||||||
type: string
|
type: list
|
||||||
|
separator: ' '
|
||||||
|
list-item:
|
||||||
|
type: string
|
||||||
|
|
||||||
additional-arguments:
|
additional-arguments:
|
||||||
type: string
|
type: list
|
||||||
|
separator: ' '
|
||||||
|
list-item:
|
||||||
|
type: string
|
||||||
|
|
||||||
# Cache configuration
|
# Cache configuration
|
||||||
cache-provider:
|
cache-provider:
|
||||||
@@ -115,7 +121,7 @@ inputs:
|
|||||||
build-scan-terms-of-use-agree:
|
build-scan-terms-of-use-agree:
|
||||||
type: enum
|
type: enum
|
||||||
allowed-values:
|
allowed-values:
|
||||||
- 'yes'
|
- yes
|
||||||
|
|
||||||
develocity-access-key:
|
develocity-access-key:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
+140
-125
File diff suppressed because one or more lines are too long
+4
-4
File diff suppressed because one or more lines are too long
+137
-106
File diff suppressed because one or more lines are too long
+4
-4
File diff suppressed because one or more lines are too long
Vendored
+139
-124
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
Vendored
+192
-160
File diff suppressed because one or more lines are too long
Vendored
+4
-4
File diff suppressed because one or more lines are too long
+76
-62
File diff suppressed because one or more lines are too long
+4
-4
File diff suppressed because one or more lines are too long
@@ -548,6 +548,11 @@ jobs:
|
|||||||
- run: ./gradlew build --scan
|
- run: ./gradlew build --scan
|
||||||
```
|
```
|
||||||
|
|
||||||
|
When a comment is added, any earlier Job Summary comments posted by the same job on that Pull Request are
|
||||||
|
automatically minimized, so only the most recent result remains expanded. This also applies when
|
||||||
|
`add-job-summary-as-pr-comment: 'on-failure'` is used: once a later run of the job succeeds, the previous
|
||||||
|
failure comment is collapsed.
|
||||||
|
|
||||||
Note that to add a Pull Request comment, the workflow must be configured with the `pull-requests: write` permission.
|
Note that to add a Pull Request comment, the workflow must be configured with the `pull-requests: write` permission.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ inputs:
|
|||||||
- disabled
|
- disabled
|
||||||
- generate
|
- generate
|
||||||
- generate-and-submit
|
- generate-and-submit
|
||||||
|
- generate-submit-and-upload
|
||||||
- generate-and-upload
|
- generate-and-upload
|
||||||
- download-and-submit
|
- download-and-submit
|
||||||
|
|
||||||
@@ -106,7 +107,7 @@ inputs:
|
|||||||
build-scan-terms-of-use-agree:
|
build-scan-terms-of-use-agree:
|
||||||
type: enum
|
type: enum
|
||||||
allowed-values:
|
allowed-values:
|
||||||
- 'yes'
|
- yes
|
||||||
|
|
||||||
develocity-access-key:
|
develocity-access-key:
|
||||||
type: string
|
type: string
|
||||||
@@ -153,7 +154,10 @@ inputs:
|
|||||||
|
|
||||||
# Deprecated action inputs
|
# Deprecated action inputs
|
||||||
arguments:
|
arguments:
|
||||||
type: string
|
type: list
|
||||||
|
separator: ' '
|
||||||
|
list-item:
|
||||||
|
type: string
|
||||||
|
|
||||||
# Experimental action inputs
|
# Experimental action inputs
|
||||||
gradle-home-cache-strict-match:
|
gradle-home-cache-strict-match:
|
||||||
|
|||||||
Generated
+125
-172
@@ -92,6 +92,19 @@
|
|||||||
"node": ">= 20"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@actions/artifact/node_modules/@octokit/endpoint": {
|
||||||
|
"version": "11.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.3.tgz",
|
||||||
|
"integrity": "sha512-FWFlNxghg4HrXkD3ifYbS/IdL/mDHjh9QcsNyhQjN8dplUoZbejsdpmuqdA76nxj2xoWPs7p8uX2SNr9rYu0Ag==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": "^16.0.0",
|
||||||
|
"universal-user-agent": "^7.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 20"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@actions/artifact/node_modules/@octokit/graphql": {
|
"node_modules/@actions/artifact/node_modules/@octokit/graphql": {
|
||||||
"version": "9.0.3",
|
"version": "9.0.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -129,6 +142,35 @@
|
|||||||
"@octokit/core": ">=7"
|
"@octokit/core": ">=7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@actions/artifact/node_modules/@octokit/request": {
|
||||||
|
"version": "10.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.10.tgz",
|
||||||
|
"integrity": "sha512-KxNC2pTqqhszMNrf12ZRd4PonRgyJdsM4F/jySiddQK+DsRcfBtUvqn8t7UsyZhnRJHvX46OohDt5N3VqIWC2w==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/endpoint": "^11.0.3",
|
||||||
|
"@octokit/request-error": "^7.0.2",
|
||||||
|
"@octokit/types": "^16.0.0",
|
||||||
|
"content-type": "^2.0.0",
|
||||||
|
"json-with-bigint": "^3.5.3",
|
||||||
|
"universal-user-agent": "^7.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 20"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@actions/artifact/node_modules/@octokit/request-error": {
|
||||||
|
"version": "7.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.1.0.tgz",
|
||||||
|
"integrity": "sha512-KMQIfq5sOPpkQYajXHwnhjCC0slzCNScLHs9JafXc4RAJI+9f+jNDlBNaIMTvazOPLgb4BnlhGJOTbnN0wIjPw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": "^16.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 20"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@actions/artifact/node_modules/before-after-hook": {
|
"node_modules/@actions/artifact/node_modules/before-after-hook": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"license": "Apache-2.0"
|
"license": "Apache-2.0"
|
||||||
@@ -227,6 +269,19 @@
|
|||||||
"node": ">= 20"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@actions/github/node_modules/@octokit/endpoint": {
|
||||||
|
"version": "11.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.3.tgz",
|
||||||
|
"integrity": "sha512-FWFlNxghg4HrXkD3ifYbS/IdL/mDHjh9QcsNyhQjN8dplUoZbejsdpmuqdA76nxj2xoWPs7p8uX2SNr9rYu0Ag==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": "^16.0.0",
|
||||||
|
"universal-user-agent": "^7.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 20"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@actions/github/node_modules/@octokit/graphql": {
|
"node_modules/@actions/github/node_modules/@octokit/graphql": {
|
||||||
"version": "9.0.3",
|
"version": "9.0.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -239,6 +294,21 @@
|
|||||||
"node": ">= 20"
|
"node": ">= 20"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest": {
|
||||||
|
"version": "14.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-14.0.0.tgz",
|
||||||
|
"integrity": "sha512-fNVRE7ufJiAA3XUrha2omTA39M6IXIc6GIZLvlbsm8QOQCYvpq/LkMNGyFlB1d8hTDzsAXa3OKtybdMAYsV/fw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": "^16.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 20"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@octokit/core": ">=6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods": {
|
"node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods": {
|
||||||
"version": "17.0.0",
|
"version": "17.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -252,6 +322,35 @@
|
|||||||
"@octokit/core": ">=6"
|
"@octokit/core": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@actions/github/node_modules/@octokit/request": {
|
||||||
|
"version": "10.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.10.tgz",
|
||||||
|
"integrity": "sha512-KxNC2pTqqhszMNrf12ZRd4PonRgyJdsM4F/jySiddQK+DsRcfBtUvqn8t7UsyZhnRJHvX46OohDt5N3VqIWC2w==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/endpoint": "^11.0.3",
|
||||||
|
"@octokit/request-error": "^7.0.2",
|
||||||
|
"@octokit/types": "^16.0.0",
|
||||||
|
"content-type": "^2.0.0",
|
||||||
|
"json-with-bigint": "^3.5.3",
|
||||||
|
"universal-user-agent": "^7.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 20"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@actions/github/node_modules/@octokit/request-error": {
|
||||||
|
"version": "7.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.1.0.tgz",
|
||||||
|
"integrity": "sha512-KMQIfq5sOPpkQYajXHwnhjCC0slzCNScLHs9JafXc4RAJI+9f+jNDlBNaIMTvazOPLgb4BnlhGJOTbnN0wIjPw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": "^16.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 20"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@actions/github/node_modules/before-after-hook": {
|
"node_modules/@actions/github/node_modules/before-after-hook": {
|
||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"license": "Apache-2.0"
|
"license": "Apache-2.0"
|
||||||
@@ -520,13 +619,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@azure/logger": {
|
"node_modules/@azure/logger": {
|
||||||
"version": "1.1.4",
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-fCqPIfOcLE+CGqGPd66c8bZpwAji98tZ4JI9i/mlTNTlsIWslCfpg48s/ypyLxZTump5sypjrKn2/kY7q8oAbA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@typespec/ts-http-runtime": "^0.3.0",
|
||||||
"tslib": "^2.6.2"
|
"tslib": "^2.6.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0"
|
"node": ">=20.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@azure/storage-blob": {
|
"node_modules/@azure/storage-blob": {
|
||||||
@@ -1793,167 +1895,10 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/auth-token": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"license": "MIT",
|
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/core": {
|
|
||||||
"version": "5.2.1",
|
|
||||||
"license": "MIT",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/auth-token": "^4.0.0",
|
|
||||||
"@octokit/graphql": "^7.1.0",
|
|
||||||
"@octokit/request": "^8.4.1",
|
|
||||||
"@octokit/request-error": "^5.1.1",
|
|
||||||
"@octokit/types": "^13.0.0",
|
|
||||||
"before-after-hook": "^2.2.0",
|
|
||||||
"universal-user-agent": "^6.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/core/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "24.2.0",
|
|
||||||
"license": "MIT",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/core/node_modules/@octokit/types": {
|
|
||||||
"version": "13.10.0",
|
|
||||||
"license": "MIT",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^24.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/endpoint": {
|
|
||||||
"version": "9.0.6",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/types": "^13.1.0",
|
|
||||||
"universal-user-agent": "^6.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/endpoint/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "24.2.0",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/endpoint/node_modules/@octokit/types": {
|
|
||||||
"version": "13.10.0",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^24.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/graphql": {
|
|
||||||
"version": "7.1.1",
|
|
||||||
"license": "MIT",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/request": "^8.4.1",
|
|
||||||
"@octokit/types": "^13.0.0",
|
|
||||||
"universal-user-agent": "^6.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/graphql/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "24.2.0",
|
|
||||||
"license": "MIT",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/graphql/node_modules/@octokit/types": {
|
|
||||||
"version": "13.10.0",
|
|
||||||
"license": "MIT",
|
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^24.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/openapi-types": {
|
"node_modules/@octokit/openapi-types": {
|
||||||
"version": "27.0.0",
|
"version": "27.0.0",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-paginate-rest": {
|
|
||||||
"version": "9.2.2",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/types": "^12.6.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@octokit/core": "5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "20.0.0",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": {
|
|
||||||
"version": "12.6.0",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^20.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/request": {
|
|
||||||
"version": "8.4.1",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/endpoint": "^9.0.6",
|
|
||||||
"@octokit/request-error": "^5.1.1",
|
|
||||||
"@octokit/types": "^13.1.0",
|
|
||||||
"universal-user-agent": "^6.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/request-error": {
|
|
||||||
"version": "5.1.1",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/types": "^13.1.0",
|
|
||||||
"deprecation": "^2.0.0",
|
|
||||||
"once": "^1.4.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/request-error/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "24.2.0",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/request-error/node_modules/@octokit/types": {
|
|
||||||
"version": "13.10.0",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^24.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/request/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "24.2.0",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/request/node_modules/@octokit/types": {
|
|
||||||
"version": "13.10.0",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^24.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/types": {
|
"node_modules/@octokit/types": {
|
||||||
"version": "16.0.0",
|
"version": "16.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -3210,11 +3155,6 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/before-after-hook": {
|
|
||||||
"version": "2.2.3",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"peer": true
|
|
||||||
},
|
|
||||||
"node_modules/binary": {
|
"node_modules/binary": {
|
||||||
"version": "0.3.0",
|
"version": "0.3.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -3640,6 +3580,19 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/content-type": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/express"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/convert-source-map": {
|
"node_modules/convert-source-map": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
@@ -3848,10 +3801,6 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/deprecation": {
|
|
||||||
"version": "2.3.1",
|
|
||||||
"license": "ISC"
|
|
||||||
},
|
|
||||||
"node_modules/detect-newline": {
|
"node_modules/detect-newline": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz",
|
||||||
@@ -6246,6 +6195,12 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
|
"node_modules/json-with-bigint": {
|
||||||
|
"version": "3.5.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/json-with-bigint/-/json-with-bigint-3.5.8.tgz",
|
||||||
|
"integrity": "sha512-eq/4KP6K34kwa7TcFdtvnftvHCD9KvHOGGICWwMFc4dOOKF5t4iYqnfLK8otCRCRv06FXOzGGyqE8h8ElMvvdw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/json5": {
|
"node_modules/json5": {
|
||||||
"version": "2.2.3",
|
"version": "2.2.3",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
@@ -6803,6 +6758,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/once": {
|
"node_modules/once": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
|
"dev": true,
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
@@ -8385,10 +8341,6 @@
|
|||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/universal-user-agent": {
|
|
||||||
"version": "6.0.1",
|
|
||||||
"license": "ISC"
|
|
||||||
},
|
|
||||||
"node_modules/unrs-resolver": {
|
"node_modules/unrs-resolver": {
|
||||||
"version": "1.12.2",
|
"version": "1.12.2",
|
||||||
"resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.12.2.tgz",
|
"resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.12.2.tgz",
|
||||||
@@ -8714,6 +8666,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/wrappy": {
|
"node_modules/wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/write-file-atomic": {
|
"node_modules/write-file-atomic": {
|
||||||
|
|||||||
@@ -68,17 +68,5 @@
|
|||||||
"prettier": "3.8.4",
|
"prettier": "3.8.4",
|
||||||
"ts-jest": "29.4.11",
|
"ts-jest": "29.4.11",
|
||||||
"typescript": "5.9.3"
|
"typescript": "5.9.3"
|
||||||
},
|
|
||||||
"overrides": {
|
|
||||||
"@azure/logger": "1.1.4",
|
|
||||||
"@octokit/request": "8.4.1",
|
|
||||||
"@octokit/request-error": "5.1.1",
|
|
||||||
"@octokit/plugin-paginate-rest": "9.2.2",
|
|
||||||
"shell-quote": "1.8.4",
|
|
||||||
"fast-xml-parser": "5.8.0",
|
|
||||||
"fast-xml-builder": "1.2.0",
|
|
||||||
"eslint": {
|
|
||||||
"brace-expansion": "5.0.6"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -206,6 +206,10 @@ export class SummaryConfig {
|
|||||||
return this.shouldAddJobSummary(this.getJobSummaryOption(), hasFailure)
|
return this.shouldAddJobSummary(this.getJobSummaryOption(), hasFailure)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
canAddPRComment(): boolean {
|
||||||
|
return this.getPRCommentOption() !== JobSummaryOption.Never
|
||||||
|
}
|
||||||
|
|
||||||
shouldAddPRComment(hasFailure: boolean): boolean {
|
shouldAddPRComment(hasFailure: boolean): boolean {
|
||||||
return this.shouldAddJobSummary(this.getPRCommentOption(), hasFailure)
|
return this.shouldAddJobSummary(this.getPRCommentOption(), hasFailure)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import * as core from '@actions/core'
|
|||||||
import * as github from '@actions/github'
|
import * as github from '@actions/github'
|
||||||
|
|
||||||
import {BuildResult} from './build-results'
|
import {BuildResult} from './build-results'
|
||||||
import {SummaryConfig, getActionId, getGithubToken} from './configuration'
|
import {DependencyGraphConfig, getActionId, getGithubToken, getJobMatrix, SummaryConfig} from './configuration'
|
||||||
import {Deprecation, getDeprecations, getErrors} from './deprecation-collector'
|
import {Deprecation, getDeprecations, getErrors} from './deprecation-collector'
|
||||||
|
|
||||||
export async function generateJobSummary(
|
export async function generateJobSummary(
|
||||||
@@ -33,6 +33,10 @@ export async function generateJobSummary(
|
|||||||
core.info('============================')
|
core.info('============================')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.canAddPRComment()) {
|
||||||
|
await minimizeObsoletePRComments()
|
||||||
|
}
|
||||||
|
|
||||||
if (config.shouldAddPRComment(hasFailure)) {
|
if (config.shouldAddPRComment(hasFailure)) {
|
||||||
await addPRComment(summaryTable)
|
await addPRComment(summaryTable)
|
||||||
}
|
}
|
||||||
@@ -48,7 +52,8 @@ async function addPRComment(jobSummary: string): Promise<void> {
|
|||||||
const pull_request_number = context.payload.pull_request.number
|
const pull_request_number = context.payload.pull_request.number
|
||||||
core.info(`Adding Job Summary as comment to PR #${pull_request_number}.`)
|
core.info(`Adding Job Summary as comment to PR #${pull_request_number}.`)
|
||||||
|
|
||||||
const prComment = `<h3>Job Summary for Gradle</h3>
|
const prComment = `${jobMarker(context)}
|
||||||
|
<h3>Job Summary for Gradle</h3>
|
||||||
<a href="${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}" target="_blank">
|
<a href="${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}" target="_blank">
|
||||||
<h5>${context.workflow} :: <em>${context.job}</em></h5>
|
<h5>${context.workflow} :: <em>${context.job}</em></h5>
|
||||||
</a>
|
</a>
|
||||||
@@ -57,6 +62,7 @@ ${jobSummary}`
|
|||||||
|
|
||||||
const github_token = getGithubToken()
|
const github_token = getGithubToken()
|
||||||
const octokit = github.getOctokit(github_token)
|
const octokit = github.getOctokit(github_token)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await octokit.rest.issues.createComment({
|
await octokit.rest.issues.createComment({
|
||||||
...context.repo,
|
...context.repo,
|
||||||
@@ -201,3 +207,77 @@ function truncateString(str: string, maxLength: number): string {
|
|||||||
return str
|
return str
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function minimizeObsoletePRComments(): Promise<void> {
|
||||||
|
const context = github.context
|
||||||
|
if (context.payload.pull_request == null) {
|
||||||
|
core.info('No pull_request trigger detected: not minimizing obsolete PR comments')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const prNumber = context.payload.pull_request.number
|
||||||
|
core.info(`Minimizing obsolete Job Summary comments on PR #${prNumber}.`)
|
||||||
|
|
||||||
|
const marker = jobMarker(context)
|
||||||
|
const octokit = github.getOctokit(getGithubToken())
|
||||||
|
const {owner, repo} = context.repo
|
||||||
|
|
||||||
|
const query = `
|
||||||
|
query($owner: String!, $repo: String!, $prNumber: Int!) {
|
||||||
|
repository(owner: $owner, name: $repo) {
|
||||||
|
pullRequest(number: $prNumber) {
|
||||||
|
comments(last: 100) {
|
||||||
|
nodes { id body isMinimized url }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
let comments: PullRequestComment[]
|
||||||
|
try {
|
||||||
|
const {repository} = await octokit.graphql<CommentsQueryResult>(query, {owner, repo, prNumber})
|
||||||
|
comments = repository.pullRequest?.comments?.nodes?.filter((c): c is PullRequestComment => c !== null) ?? []
|
||||||
|
} catch (error) {
|
||||||
|
return core.warning(`Failed to fetch comments: ${error}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
const mutation = `
|
||||||
|
mutation($id: ID!) {
|
||||||
|
minimizeComment(input: {subjectId: $id, classifier: OUTDATED}) {
|
||||||
|
clientMutationId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
|
const commentsToMinimize = comments
|
||||||
|
.filter(c => !c.isMinimized && c.body.includes(marker))
|
||||||
|
.map(async c =>
|
||||||
|
octokit
|
||||||
|
.graphql(mutation, {id: c.id})
|
||||||
|
.then(() => core.info(`Successfully minimized (id:${c.id}, url:${c.url})`))
|
||||||
|
.catch(e => core.warning(`Failed to minimize (id:${c.id}, url:${c.url}, error:${e?.message || e})`))
|
||||||
|
)
|
||||||
|
await Promise.allSettled(commentsToMinimize)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function jobMarker(context: typeof github.context): string {
|
||||||
|
const jobCorrelator = DependencyGraphConfig.constructJobCorrelator(context.workflow, context.job, getJobMatrix())
|
||||||
|
return `<!-- gradle-job-summary: ${jobCorrelator} -->`
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PullRequestComment {
|
||||||
|
id: string
|
||||||
|
body: string
|
||||||
|
isMinimized: boolean
|
||||||
|
url: string
|
||||||
|
}
|
||||||
|
|
||||||
|
interface CommentsQueryResult {
|
||||||
|
repository: {
|
||||||
|
pullRequest?: {
|
||||||
|
comments?: {
|
||||||
|
nodes?: (PullRequestComment | null)[] | null
|
||||||
|
} | null
|
||||||
|
} | null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,8 +1,15 @@
|
|||||||
import dedent from 'dedent'
|
import dedent from 'dedent'
|
||||||
import {describe, expect, it} from '@jest/globals'
|
import * as github from '@actions/github'
|
||||||
|
import {afterEach, describe, expect, it} from '@jest/globals'
|
||||||
|
|
||||||
import {BuildResult} from '../../src/build-results'
|
import {BuildResult} from '../../src/build-results'
|
||||||
import {renderSummaryTable} from '../../src/job-summary'
|
import {jobMarker, renderSummaryTable} from '../../src/job-summary'
|
||||||
|
|
||||||
|
const MATRIX_INPUT_ENV = 'INPUT_WORKFLOW-JOB-CONTEXT'
|
||||||
|
|
||||||
|
function fakeContext(workflow: string, job: string): typeof github.context {
|
||||||
|
return {workflow, job} as unknown as typeof github.context
|
||||||
|
}
|
||||||
|
|
||||||
const successfulHelpBuild: BuildResult = {
|
const successfulHelpBuild: BuildResult = {
|
||||||
rootProjectName: 'root',
|
rootProjectName: 'root',
|
||||||
@@ -177,3 +184,27 @@ describe('renderSummaryTable', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('jobMarker', () => {
|
||||||
|
const original = process.env[MATRIX_INPUT_ENV]
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
if (original === undefined) {
|
||||||
|
delete process.env[MATRIX_INPUT_ENV]
|
||||||
|
} else {
|
||||||
|
process.env[MATRIX_INPUT_ENV] = original
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
it('builds a hidden marker from the workflow and job', () => {
|
||||||
|
process.env[MATRIX_INPUT_ENV] = 'null'
|
||||||
|
const marker = jobMarker(fakeContext('CI', 'build'))
|
||||||
|
expect(marker).toBe('<!-- gradle-job-summary: ci-build -->')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('includes the job matrix in the marker', () => {
|
||||||
|
process.env[MATRIX_INPUT_ENV] = JSON.stringify({os: 'ubuntu', java: '17'})
|
||||||
|
const marker = jobMarker(fakeContext('CI', 'build'))
|
||||||
|
expect(marker).toBe('<!-- gradle-job-summary: ci-build-ubuntu-17 -->')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ export declare interface CacheOptions {
|
|||||||
writeOnly: boolean;
|
writeOnly: boolean;
|
||||||
overwriteExisting: boolean;
|
overwriteExisting: boolean;
|
||||||
strictMatch: boolean;
|
strictMatch: boolean;
|
||||||
cleanup: string;
|
cleanup: 'always' | 'on-success' | 'never';
|
||||||
encryptionKey?: string;
|
encryptionKey?: string;
|
||||||
includes: string[];
|
includes: string[];
|
||||||
excludes: string[];
|
excludes: string[];
|
||||||
|
|||||||
+2
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gradle-actions-caching",
|
"name": "gradle-actions-caching",
|
||||||
"version": "0.3.0",
|
"version": "0.6.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./index.js",
|
"main": "./index.js",
|
||||||
"types": "./index.d.ts",
|
"types": "./index.d.ts",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"toolPackages": [
|
"toolPackages": [
|
||||||
{
|
{
|
||||||
"packageName": "@microsoft/api-extractor",
|
"packageName": "@microsoft/api-extractor",
|
||||||
"packageVersion": "7.57.6"
|
"packageVersion": "7.58.8"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,4 +14,7 @@ inputs:
|
|||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
failed-wrapper:
|
failed-wrapper:
|
||||||
type: string
|
type: list
|
||||||
|
separator: '|'
|
||||||
|
list-item:
|
||||||
|
type: string
|
||||||
|
|||||||
Reference in New Issue
Block a user