mirror of
https://github.com/actions/setup-java.git
synced 2026-08-05 12:59:28 +08:00
Compare commits
437 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ab597f914a | |||
| ef9440a2b8 | |||
| 2dd851a56a | |||
| 885218c5e4 | |||
| 2924169ccc | |||
| 955f34f16f | |||
| 7a9a8b1dcc | |||
| f48de5f4c7 | |||
| 881ee1636f | |||
| 60b1ab8234 | |||
| dd7dc10522 | |||
| 7c6f629e2f | |||
| d72315472c | |||
| 536de9e5ba | |||
| 9a8c300417 | |||
| 5827477733 | |||
| 3cc3643700 | |||
| 6937f5eb31 | |||
| 0b56831a10 | |||
| 9f43141311 | |||
| ec4dbbe20d | |||
| 62f345fa33 | |||
| bcd3ba3d32 | |||
| 27f2c62824 | |||
| 19c23b379e | |||
| 6e26972896 | |||
| 5894ef6b27 | |||
| e1ce3a3428 | |||
| ce75feb3d3 | |||
| 382d4b753d | |||
| 24d1ce4c2b | |||
| 1c3b3d28f0 | |||
| 0b0bd25927 | |||
| 089b010dc8 | |||
| e07d36bbdd | |||
| 69304e5bab | |||
| f75542ba2b | |||
| c59dceb0cd | |||
| 8f48118d89 | |||
| c79143eaae | |||
| 77c695c0d0 | |||
| 7b26641a55 | |||
| e08df439e0 | |||
| cd3b6000e4 | |||
| c3d7ccbf81 | |||
| 46f6294045 | |||
| e40a8e0642 | |||
| 6e2e32e729 | |||
| 38fa86f9e4 | |||
| ecd5f809c2 | |||
| 4a24efdcc9 | |||
| cc8cdedf67 | |||
| 4b0728bd0d | |||
| 7d485884af | |||
| c3568cc9d9 | |||
| 81c13a41f9 | |||
| 3c85b14378 | |||
| 80c368b720 | |||
| cd57b95697 | |||
| 7a475d86d1 | |||
| 92f9362dd0 | |||
| 71cfe8e0ed | |||
| eb6157cd13 | |||
| 2adeb10550 | |||
| 23f8c419c6 | |||
| 6f7d7a6eb1 | |||
| 2301a55b6d | |||
| 2789aa9170 | |||
| 28fb8cb06b | |||
| 174d4b5609 | |||
| 86ce8e6cc8 | |||
| 90be2728bc | |||
| 3157986b3f | |||
| 548a822bee | |||
| f848fd1976 | |||
| fe9b749bcb | |||
| 4db08ef6bf | |||
| 7dbccc66ee | |||
| 8a3e8157a1 | |||
| f7121373a9 | |||
| 2a07c83aea | |||
| d3530c1eb4 | |||
| 0f481fcb61 | |||
| c4922bf809 | |||
| 6657b99340 | |||
| a50fdccef1 | |||
| 77ee41d00e | |||
| 0765b158bf | |||
| c712b2fb55 | |||
| 733efaeaca | |||
| 6c4d4a5025 | |||
| 324b33387d | |||
| 2e73c8f8cd | |||
| b150355f04 | |||
| e9339ddc84 | |||
| bf1fac860b | |||
| aff09c2230 | |||
| c5f2f2ea96 | |||
| 623c707d77 | |||
| 1bcf9fb12c | |||
| fa2c6508d1 | |||
| 1d56e31dbb | |||
| 1d25252804 | |||
| 668c1ea991 | |||
| a9a46fbe09 | |||
| 5431e71f9a | |||
| 4baa9b45d2 | |||
| eab4b0854d | |||
| bf0c0e6df3 | |||
| 92163d3dc6 | |||
| 679e4e46a7 | |||
| 525097081d | |||
| c09b25f3e7 | |||
| dc8e16ad37 | |||
| 3d27da4ac1 | |||
| cefdecda46 | |||
| 347226bb3b | |||
| 5866e121b4 | |||
| 2872526dc6 | |||
| bb8b13a4a5 | |||
| 957ad8b43e | |||
| ce7f9ce621 | |||
| 6e9017e125 | |||
| baa1691374 | |||
| bc52a13212 | |||
| c9b6aee07e | |||
| f300429fba | |||
| ad2b38190b | |||
| b24df5bba5 | |||
| 43120bc3c3 | |||
| ad9d6a6320 | |||
| 039af37997 | |||
| 1756ab6acd | |||
| 662bb59f48 | |||
| 1071fc12d6 | |||
| 576b821f29 | |||
| 307d3a25a0 | |||
| b622de1dfa | |||
| c76542e033 | |||
| 0756542bc5 | |||
| 1d018f9b8b | |||
| fe779bf55e | |||
| be666c2fcd | |||
| f7a6fefba9 | |||
| d81c4e45f3 | |||
| 1b1bbe1085 | |||
| 5d7b214633 | |||
| f2beeb24e1 | |||
| 4e7e684fbb | |||
| 46c56d6f92 | |||
| 66b945764b | |||
| 6ba5449b7d | |||
| de5a937a1d | |||
| ead9eaa3cf | |||
| 8c57fa3627 | |||
| a7ab372554 | |||
| d0351b4837 | |||
| dded088883 | |||
| 0913e9a06e | |||
| e9343db97e | |||
| ae2b61dbc6 | |||
| c190c18feb | |||
| 67aec007b3 | |||
| ebb356cc4e | |||
| f4f1212c88 | |||
| c5195efecf | |||
| dd38875f93 | |||
| 148017a9b0 | |||
| 3b6c050358 | |||
| b8ebb8ba1d | |||
| 799ee7c97e | |||
| 3a4f6e1af5 | |||
| 25f376e348 | |||
| d4e4b6bbc1 | |||
| 28b532bcb3 | |||
| 51ab6d2e30 | |||
| 99d3141d9b | |||
| 7a6d8a8234 | |||
| 7136edc5e8 | |||
| 8df1039502 | |||
| 870c199c48 | |||
| 83a06ff9d9 | |||
| 292cc14be8 | |||
| b36c23c0d9 | |||
| 40b9536ce5 | |||
| 0a40ce6f61 | |||
| 68b1d5a3da | |||
| bcfbca5b71 | |||
| 78eae7945c | |||
| 2dfa2011c5 | |||
| 7467385c61 | |||
| 8e04ddff28 | |||
| 67fbd726da | |||
| 6a0805fcef | |||
| fd08b9c8dc | |||
| 2e74cbce18 | |||
| a1c6c9c867 | |||
| 99b8673ff6 | |||
| 5896cecc08 | |||
| 80ae3c2885 | |||
| 9704b39bf2 | |||
| 7a445ee88d | |||
| 3232623d9c | |||
| c0660d8edc | |||
| 2f7af1b9c5 | |||
| 16ef37f8dd | |||
| a2374547df | |||
| 387ac29b30 | |||
| 9eda6b51cc | |||
| 78078da0cd | |||
| 5caaba646e | |||
| 0ab4596768 | |||
| 4075bfc1b5 | |||
| 5b86b67f5b | |||
| b943a4ed87 | |||
| c16064d22c | |||
| cd89f46ac9 | |||
| 4fb397523b | |||
| 33b10b64eb | |||
| 75c6561172 | |||
| ebe05e0f88 | |||
| 46099e1f14 | |||
| 1a3cd386c6 | |||
| 91f49aa1b0 | |||
| 1f2faad7e0 | |||
| 45058d7f99 | |||
| 87c1c7064c | |||
| 5e4a7c3698 | |||
| f4213ceea0 | |||
| ba4a2dd11d | |||
| 01a228c633 | |||
| 07b6c30c67 | |||
| c19d52bc93 | |||
| 3927f47357 | |||
| cb77eb7f64 | |||
| 9ff43a1ebe | |||
| 575d86297c | |||
| d70493eaf0 | |||
| 088a9ed5f6 | |||
| 8d9836d093 | |||
| 9f75459cbe | |||
| 827f99856d | |||
| 27bb911606 | |||
| ddb82ce8a6 | |||
| 404e5db3a1 | |||
| 191ba8c6ba | |||
| e42168ca1a | |||
| 5ffc13f417 | |||
| 669e0727d8 | |||
| 888b4006f3 | |||
| 676c490d4c | |||
| 0de5c66fc0 | |||
| ea15b3b99c | |||
| 14d87b223c | |||
| 3f07048e3d | |||
| 9b86bbe88a | |||
| 8f12c5c4d1 | |||
| e11351903a | |||
| 285fb318c5 | |||
| 308abcba03 | |||
| 03d1057e7d | |||
| d401f0c450 | |||
| 5e1c7d44c8 | |||
| bf3c595741 | |||
| 35e7c82cf7 | |||
| 5bbbb020e8 | |||
| 007465e618 | |||
| 8a24ed99d8 | |||
| 3dc9295fa8 | |||
| 81f1f778b7 | |||
| 06db6c25b8 | |||
| 545223a83e | |||
| a3c7fb1220 | |||
| 1eb7169fc2 | |||
| caaa9d738f | |||
| 1df8dbefe2 | |||
| c3ac5dd0ed | |||
| dcd29da2fa | |||
| 19eeec562b | |||
| bd7e5d28eb | |||
| 6cdf39a6b6 | |||
| 7db6b4554c | |||
| bf2f02c4a7 | |||
| de1bb2b0c5 | |||
| 2c53c1a588 | |||
| 3617c43588 | |||
| a82e6d0020 | |||
| fbb269240e | |||
| dfcd06a4b9 | |||
| e150063ee4 | |||
| eb1418aa81 | |||
| 499ae9c28b | |||
| a18c333f3f | |||
| 26eeac8c9e | |||
| cdc5f296eb | |||
| b80173ab1e | |||
| a96c2ca6ae | |||
| 7bbeb80d24 | |||
| d854b6da19 | |||
| 749e4491fa | |||
| aa53851224 | |||
| 5b36705a13 | |||
| 4656cbcede | |||
| ef96bec0e4 | |||
| 8e8bf44561 | |||
| 40dd195c45 | |||
| 858120d4a8 | |||
| ad9cecf99b | |||
| 8048bbee47 | |||
| 9e9f60b996 | |||
| 46f0194a3b | |||
| c69efbe773 | |||
| 3c69e15101 | |||
| bf1c35bd9d | |||
| 66a84830d9 | |||
| 8ac768a2cf | |||
| 2c7a4878f5 | |||
| e2f30c1450 | |||
| 2dfaeac2db | |||
| aa24fa78d2 | |||
| 25d94e7786 | |||
| 2fc49d780a | |||
| e6a4b93088 | |||
| 821cc3dbd1 | |||
| 4903eafcd7 | |||
| a0500669b7 | |||
| d397c16c56 | |||
| 16cca5479d | |||
| 7b469c48c4 | |||
| 2506d21b74 | |||
| 187f735c38 | |||
| 48576e577e | |||
| fa01820a3b | |||
| 62808131e1 | |||
| ddbbc2fff5 | |||
| 4fba831118 | |||
| 11556068a2 | |||
| ec303d3bdf | |||
| 1c449b9ad2 | |||
| 3e3d8c490f | |||
| 72dec17e4f | |||
| e8f1c8b5ca | |||
| 05b9e395e1 | |||
| 860f600565 | |||
| bae3140877 | |||
| fa0272551b | |||
| 30cdb8c7dd | |||
| dd80852400 | |||
| 4fe61d24fe | |||
| 45b7b136cf | |||
| f56009127d | |||
| fa513641c0 | |||
| 055250a105 | |||
| 0ed94a5678 | |||
| 83b77aa58b | |||
| 9519cf1382 | |||
| 02c73de3fe | |||
| fd3f6750a0 | |||
| 1aa8bf7608 | |||
| 9c8c90e08c | |||
| cd35109007 | |||
| d2e3f417a9 | |||
| 0aa6f2a84f | |||
| dc1a9f2791 | |||
| e886040dc2 | |||
| efbea1411b | |||
| c41070eda4 | |||
| f69f00b5e5 | |||
| 2e1dfa1fb4 | |||
| efcb607a6b | |||
| ca584e7011 | |||
| 69e93308b0 | |||
| a12e082d83 | |||
| 04d53533c2 | |||
| d8da887cad | |||
| f0bb916062 | |||
| d23aed3c80 | |||
| 8d22286106 | |||
| db2f350d2b | |||
| 5f00602cd1 | |||
| d61af71edf | |||
| ae26cabe43 | |||
| ee43590bc7 | |||
| c187df66d0 | |||
| 8db439b6b4 | |||
| e39cf0ebdc | |||
| 770ccdbc4b | |||
| 6a258a9690 | |||
| 7ac3cd263f | |||
| d34438b137 | |||
| 61c179a6ef | |||
| 68c162b39c | |||
| b02a10773f | |||
| 6df0b04fb5 | |||
| a1ad2000b3 | |||
| 3bc31aaf88 | |||
| 30cd52e29b | |||
| 2e40ee8132 | |||
| c21fb9392d | |||
| faa22ddfbc | |||
| 08e4e813b8 | |||
| 4b1b3d4a82 | |||
| a388b3faf4 | |||
| ad01d131cc | |||
| d9126d7df2 | |||
| 53ac717e09 | |||
| cbc183b1c1 | |||
| 0443912ed7 | |||
| 56b2808da7 | |||
| 00401c4488 | |||
| 1e063f2878 | |||
| 8764a52df1 | |||
| b53500dabc | |||
| ebb424f2cb | |||
| 9c7940b9c6 | |||
| fc62ccaa4f | |||
| e73e96a93b | |||
| ea31b1d738 | |||
| ff0054dfbf | |||
| 81290cdb8c | |||
| 546dae7e87 | |||
| 4d656d0138 | |||
| 719bcb4f94 | |||
| 661c4c13b4 | |||
| 2fac83dd2d | |||
| fbe6d87076 | |||
| 371353f882 | |||
| 5222f725dd | |||
| 089d28c90b | |||
| 552366fa8e | |||
| 61c9e3a719 | |||
| e3619375bd | |||
| d202f5dbf7 | |||
| 11790a2d66 | |||
| 8bb50d97d6 | |||
| fe06bcdc44 | |||
| d34a7e45c8 |
@@ -1,2 +1,4 @@
|
|||||||
|
* text=auto eol=lf
|
||||||
dist/index.js -diff -merge
|
dist/index.js -diff -merge
|
||||||
dist/index.js linguist-generated=true
|
dist/index.js linguist-generated=true
|
||||||
|
.licenses/** -diff linguist-generated=true
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
* @actions/setup-actions-team
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a bug report
|
||||||
|
title: ''
|
||||||
|
labels: bug, needs triage
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Description:**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**Task version:**
|
||||||
|
Specify the task version
|
||||||
|
|
||||||
|
**Platform:**
|
||||||
|
- [ ] Ubuntu
|
||||||
|
- [ ] macOS
|
||||||
|
- [ ] Windows
|
||||||
|
|
||||||
|
**Runner type:**
|
||||||
|
- [ ] Hosted
|
||||||
|
- [ ] Self-hosted
|
||||||
|
|
||||||
|
**Repro steps:**
|
||||||
|
A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link.
|
||||||
|
|
||||||
|
**Expected behavior:**
|
||||||
|
A description of what you expected to happen.
|
||||||
|
|
||||||
|
**Actual behavior:**
|
||||||
|
A description of what is actually happening.
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: feature request, needs triage
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
**Description:**
|
||||||
|
Describe your proposal.
|
||||||
|
|
||||||
|
**Justification:**
|
||||||
|
Justification or a use case for your proposal.
|
||||||
|
|
||||||
|
**Are you willing to submit a PR?**
|
||||||
|
<!--- We accept contributions! -->
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
name: New Java distribution template
|
||||||
|
about: Suggest a new Java distribution
|
||||||
|
title: ''
|
||||||
|
labels: feature request, needs triage
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
**Description:**
|
||||||
|
Describe your proposal.
|
||||||
|
|
||||||
|
**Justification:**
|
||||||
|
Justification or a use case for your proposal.
|
||||||
|
|
||||||
|
**Download URL:**
|
||||||
|
Download URL for the new distribution.
|
||||||
|
|
||||||
|
**License:**
|
||||||
|
Link to the license for the new distribution.
|
||||||
|
|
||||||
|
**Are you willing to submit a PR?**
|
||||||
|
<!--- We accept contributions! -->
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
**Description:**
|
||||||
|
Describe your changes.
|
||||||
|
|
||||||
|
**Related issue:**
|
||||||
|
Add link to the related issue.
|
||||||
|
|
||||||
|
**Download URL:**
|
||||||
|
Download URL for the new distribution.
|
||||||
|
|
||||||
|
**License:**
|
||||||
|
Link to the license for the new distribution.
|
||||||
|
|
||||||
|
**Check list:**
|
||||||
|
- [ ] Mark if documentation changes are required.
|
||||||
|
- [ ] Mark if tests were added or updated to cover the changes.
|
||||||
|
- [ ] Mark if new distribution is being added.
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# To get started with Dependabot version updates, you'll need to specify which
|
||||||
|
# package ecosystems to update and where the package manifests are located.
|
||||||
|
# Please see the documentation for all configuration options:
|
||||||
|
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
# Enable version updates for npm
|
||||||
|
- package-ecosystem: 'npm'
|
||||||
|
# Look for `package.json` and `lock` files in the `root` directory
|
||||||
|
directory: '/'
|
||||||
|
# Check the npm registry for updates every day (weekdays)
|
||||||
|
schedule:
|
||||||
|
interval: 'weekly'
|
||||||
|
|
||||||
|
# Enable version updates for GitHub Actions
|
||||||
|
- package-ecosystem: 'github-actions'
|
||||||
|
# Workflow files stored in the default location of `.github/workflows`
|
||||||
|
# You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.
|
||||||
|
directory: '/'
|
||||||
|
schedule:
|
||||||
|
interval: 'weekly'
|
||||||
@@ -9,6 +9,31 @@
|
|||||||
"message": 3
|
"message": 3
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"owner": "javac",
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "^([^:]+):(\\d+): (warning|error): (.+?)$",
|
||||||
|
"file": 1,
|
||||||
|
"line": 2,
|
||||||
|
"severity": 3,
|
||||||
|
"message": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"owner": "maven-javac",
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "^\\[(WARNING|ERROR)\\]\\s+(.+?\\.java):\\[(\\d+),(\\d+)\\]\\s+(.+)$",
|
||||||
|
"severity": 1,
|
||||||
|
"file": 2,
|
||||||
|
"line": 3,
|
||||||
|
"column": 4,
|
||||||
|
"message": 5
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
**Description:**
|
||||||
|
Describe your changes.
|
||||||
|
|
||||||
|
**Related issue:**
|
||||||
|
Add link to the related issue.
|
||||||
|
|
||||||
|
**Check list:**
|
||||||
|
- [ ] Ran `npm run check` locally (format, lint, build, test) and all checks pass.
|
||||||
|
- [ ] Mark if documentation changes are required.
|
||||||
|
- [ ] Mark if tests were added or updated to cover the changes.
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
name: Basic validation
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/*
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-basic-validation:
|
||||||
|
name: Basic validation
|
||||||
|
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
|
||||||
|
with:
|
||||||
|
node-version: '24.x'
|
||||||
@@ -0,0 +1,209 @@
|
|||||||
|
name: Benchmark cache restore
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
baseline-ref:
|
||||||
|
description: Git ref containing the sequential restore implementation
|
||||||
|
required: true
|
||||||
|
default: main
|
||||||
|
type: string
|
||||||
|
candidate-ref:
|
||||||
|
description: Git ref containing the concurrent restore implementation (defaults to the dispatched ref)
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
warm-caches:
|
||||||
|
name: Warm ${{ matrix.tool }} ${{ matrix.profile }} caches (${{ matrix.os }})
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
tool: [maven, gradle]
|
||||||
|
profile: [small, large]
|
||||||
|
steps:
|
||||||
|
- name: Checkout benchmark workflow
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Checkout baseline
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
path: baseline
|
||||||
|
persist-credentials: false
|
||||||
|
ref: ${{ inputs.baseline-ref }}
|
||||||
|
- name: Checkout candidate
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
path: candidate
|
||||||
|
persist-credentials: false
|
||||||
|
ref: ${{ inputs.candidate-ref || github.ref }}
|
||||||
|
- name: Prepare benchmark inputs
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh prepare "${{ matrix.tool }}" "${{ matrix.profile }}"
|
||||||
|
- name: Prepare cache save
|
||||||
|
uses: ./candidate
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '17'
|
||||||
|
cache: ${{ matrix.tool }}
|
||||||
|
cache-dependency-path: benchmark/${{ matrix.tool == 'maven' && 'pom.xml' || 'build.gradle' }}
|
||||||
|
- name: Populate benchmark caches
|
||||||
|
run: |
|
||||||
|
bash __tests__/benchmark-cache-restore.sh reset "${{ matrix.tool }}"
|
||||||
|
bash __tests__/benchmark-cache-restore.sh populate "${{ matrix.tool }}" "${{ matrix.profile }}"
|
||||||
|
|
||||||
|
benchmark:
|
||||||
|
name: Benchmark ${{ matrix.tool }} ${{ matrix.profile }} (${{ matrix.os }})
|
||||||
|
needs: warm-caches
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
tool: [maven, gradle]
|
||||||
|
profile: [small, large]
|
||||||
|
steps:
|
||||||
|
- name: Checkout benchmark workflow
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Checkout baseline
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
path: baseline
|
||||||
|
persist-credentials: false
|
||||||
|
ref: ${{ inputs.baseline-ref }}
|
||||||
|
- name: Checkout candidate
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
path: candidate
|
||||||
|
persist-credentials: false
|
||||||
|
ref: ${{ inputs.candidate-ref || github.ref }}
|
||||||
|
- name: Prepare benchmark inputs
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh prepare "${{ matrix.tool }}" "${{ matrix.profile }}"
|
||||||
|
|
||||||
|
- name: Reset caches for baseline iteration 1
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh reset "${{ matrix.tool }}"
|
||||||
|
- name: Start baseline iteration 1 timer
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh start "${{ matrix.tool }}"
|
||||||
|
- name: Restore with baseline iteration 1
|
||||||
|
id: baseline-1
|
||||||
|
uses: ./baseline
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '17'
|
||||||
|
cache: ${{ matrix.tool }}
|
||||||
|
cache-dependency-path: benchmark/${{ matrix.tool == 'maven' && 'pom.xml' || 'build.gradle' }}
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Record baseline iteration 1
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.baseline-1.outputs.cache-hit }}
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh record "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.profile }}" baseline 1 "$CACHE_HIT"
|
||||||
|
|
||||||
|
- name: Reset caches for candidate iteration 1
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh reset "${{ matrix.tool }}"
|
||||||
|
- name: Start candidate iteration 1 timer
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh start "${{ matrix.tool }}"
|
||||||
|
- name: Restore with candidate iteration 1
|
||||||
|
id: candidate-1
|
||||||
|
uses: ./candidate
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '17'
|
||||||
|
cache: ${{ matrix.tool }}
|
||||||
|
cache-dependency-path: benchmark/${{ matrix.tool == 'maven' && 'pom.xml' || 'build.gradle' }}
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Record candidate iteration 1
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.candidate-1.outputs.cache-hit }}
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh record "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.profile }}" candidate 1 "$CACHE_HIT"
|
||||||
|
|
||||||
|
- name: Reset caches for candidate iteration 2
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh reset "${{ matrix.tool }}"
|
||||||
|
- name: Start candidate iteration 2 timer
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh start "${{ matrix.tool }}"
|
||||||
|
- name: Restore with candidate iteration 2
|
||||||
|
id: candidate-2
|
||||||
|
uses: ./candidate
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '17'
|
||||||
|
cache: ${{ matrix.tool }}
|
||||||
|
cache-dependency-path: benchmark/${{ matrix.tool == 'maven' && 'pom.xml' || 'build.gradle' }}
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Record candidate iteration 2
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.candidate-2.outputs.cache-hit }}
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh record "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.profile }}" candidate 2 "$CACHE_HIT"
|
||||||
|
|
||||||
|
- name: Reset caches for baseline iteration 2
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh reset "${{ matrix.tool }}"
|
||||||
|
- name: Start baseline iteration 2 timer
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh start "${{ matrix.tool }}"
|
||||||
|
- name: Restore with baseline iteration 2
|
||||||
|
id: baseline-2
|
||||||
|
uses: ./baseline
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '17'
|
||||||
|
cache: ${{ matrix.tool }}
|
||||||
|
cache-dependency-path: benchmark/${{ matrix.tool == 'maven' && 'pom.xml' || 'build.gradle' }}
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Record baseline iteration 2
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.baseline-2.outputs.cache-hit }}
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh record "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.profile }}" baseline 2 "$CACHE_HIT"
|
||||||
|
|
||||||
|
- name: Reset caches for baseline iteration 3
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh reset "${{ matrix.tool }}"
|
||||||
|
- name: Start baseline iteration 3 timer
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh start "${{ matrix.tool }}"
|
||||||
|
- name: Restore with baseline iteration 3
|
||||||
|
id: baseline-3
|
||||||
|
uses: ./baseline
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '17'
|
||||||
|
cache: ${{ matrix.tool }}
|
||||||
|
cache-dependency-path: benchmark/${{ matrix.tool == 'maven' && 'pom.xml' || 'build.gradle' }}
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Record baseline iteration 3
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.baseline-3.outputs.cache-hit }}
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh record "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.profile }}" baseline 3 "$CACHE_HIT"
|
||||||
|
|
||||||
|
- name: Reset caches for candidate iteration 3
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh reset "${{ matrix.tool }}"
|
||||||
|
- name: Start candidate iteration 3 timer
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh start "${{ matrix.tool }}"
|
||||||
|
- name: Restore with candidate iteration 3
|
||||||
|
id: candidate-3
|
||||||
|
uses: ./candidate
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '17'
|
||||||
|
cache: ${{ matrix.tool }}
|
||||||
|
cache-dependency-path: benchmark/${{ matrix.tool == 'maven' && 'pom.xml' || 'build.gradle' }}
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Record candidate iteration 3
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.candidate-3.outputs.cache-hit }}
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh record "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.profile }}" candidate 3 "$CACHE_HIT"
|
||||||
|
|
||||||
|
- name: Summarize benchmark
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh summarize "${{ matrix.tool }}" "$GITHUB_STEP_SUMMARY"
|
||||||
|
- name: Upload raw timings
|
||||||
|
uses: actions/upload-artifact@v7
|
||||||
|
with:
|
||||||
|
name: cache-restore-${{ matrix.os }}-${{ matrix.tool }}-${{ matrix.profile }}
|
||||||
|
path: .benchmark-results/timings.csv
|
||||||
|
if-no-files-found: error
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
name: Check dist/
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-check-dist:
|
||||||
|
name: Check dist/
|
||||||
|
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
|
||||||
|
with:
|
||||||
|
node-version: '24.x'
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
name: CodeQL analysis
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
schedule:
|
||||||
|
- cron: '0 3 * * 0'
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-codeQL-analysis:
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
name: CodeQL analysis
|
||||||
|
uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main
|
||||||
@@ -0,0 +1,497 @@
|
|||||||
|
name: Validate cache
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/*
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
gradle-save:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for gradle
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '17'
|
||||||
|
cache: gradle
|
||||||
|
- name: Create files to cache
|
||||||
|
# Need to avoid using Gradle daemon to stabilize the save process on Windows
|
||||||
|
# https://github.com/actions/cache/issues/454#issuecomment-840493935
|
||||||
|
run: |
|
||||||
|
gradle downloadDependencies --no-daemon -p __tests__/cache/gradle1
|
||||||
|
mkdir -p "$HOME/.gradle/wrapper/dists/setup-java-e2e"
|
||||||
|
echo "gradle wrapper cache" > "$HOME/.gradle/wrapper/dists/setup-java-e2e/payload"
|
||||||
|
bash __tests__/check-dir.sh "$HOME/.gradle/caches"
|
||||||
|
bash __tests__/check-dir.sh "$HOME/.gradle/wrapper/dists"
|
||||||
|
gradle-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
needs: gradle-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for gradle
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: gradle
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Confirm that ~/.gradle/caches directory has been made
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.gradle/caches"
|
||||||
|
- name: Confirm that the Gradle Wrapper cache has been restored
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.gradle/wrapper/dists"
|
||||||
|
maven-save:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for maven
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: maven
|
||||||
|
- name: Create files to cache
|
||||||
|
run: |
|
||||||
|
mvn verify -f __tests__/cache/maven/pom.xml
|
||||||
|
mkdir -p "$HOME/.m2/wrapper/dists/setup-java-e2e"
|
||||||
|
echo "maven wrapper cache" > "$HOME/.m2/wrapper/dists/setup-java-e2e/payload"
|
||||||
|
bash __tests__/check-dir.sh "$HOME/.m2/repository"
|
||||||
|
bash __tests__/check-dir.sh "$HOME/.m2/wrapper/dists"
|
||||||
|
maven-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
needs: maven-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for maven
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: maven
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Confirm that ~/.m2/repository directory has been made
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.m2/repository"
|
||||||
|
- name: Confirm that the Maven Wrapper cache has been restored
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.m2/wrapper/dists"
|
||||||
|
sbt-save:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
working-directory: __tests__/cache/sbt
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-22.04]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for sbt
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: sbt
|
||||||
|
- name: Setup SBT
|
||||||
|
if: matrix.os == 'macos-15-intel'
|
||||||
|
run: |
|
||||||
|
echo ""Installing SBT...""
|
||||||
|
brew install sbt
|
||||||
|
- name: Create files to cache
|
||||||
|
run: sbt update
|
||||||
|
|
||||||
|
- name: Check files to cache on macos-latest
|
||||||
|
if: matrix.os == 'macos-15-intel'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/Library/Caches/Coursier"
|
||||||
|
- name: Check files to cache on windows-latest
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/AppData/Local/Coursier/Cache"
|
||||||
|
- name: Check files to cache on ubuntu-latest
|
||||||
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/.cache/coursier"
|
||||||
|
sbt-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
working-directory: __tests__/cache/sbt
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-22.04]
|
||||||
|
needs: sbt-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for sbt
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: sbt
|
||||||
|
cache-read-only: true
|
||||||
|
|
||||||
|
- name: Confirm that ~/Library/Caches/Coursier directory has been made
|
||||||
|
if: matrix.os == 'macos-15-intel'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/Library/Caches/Coursier"
|
||||||
|
- name: Confirm that ~/AppData/Local/Coursier/Cache directory has been made
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/AppData/Local/Coursier/Cache"
|
||||||
|
- name: Confirm that ~/.cache/coursier directory has been made
|
||||||
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/.cache/coursier"
|
||||||
|
gradle1-save:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for gradle
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '17'
|
||||||
|
cache: gradle
|
||||||
|
cache-dependency-path: __tests__/cache/gradle1/*.gradle*
|
||||||
|
- name: Create files to cache
|
||||||
|
# Need to avoid using Gradle daemon to stabilize the save process on Windows
|
||||||
|
# https://github.com/actions/cache/issues/454#issuecomment-840493935
|
||||||
|
run: |
|
||||||
|
gradle downloadDependencies --no-daemon -p __tests__/cache/gradle1
|
||||||
|
mkdir -p "$HOME/.gradle/wrapper/dists/setup-java-e2e-gradle1"
|
||||||
|
echo "gradle wrapper cache gradle1" > "$HOME/.gradle/wrapper/dists/setup-java-e2e-gradle1/payload"
|
||||||
|
bash __tests__/check-dir.sh "$HOME/.gradle/caches"
|
||||||
|
bash __tests__/check-dir.sh "$HOME/.gradle/wrapper/dists"
|
||||||
|
gradle1-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
needs: gradle1-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for gradle
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: gradle
|
||||||
|
cache-dependency-path: __tests__/cache/gradle1/*.gradle*
|
||||||
|
- name: Confirm that ~/.gradle/caches directory has been made
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.gradle/caches"
|
||||||
|
- name: Confirm that the Gradle Wrapper cache has been restored
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.gradle/wrapper/dists"
|
||||||
|
gradle2-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
needs: gradle1-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for gradle
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: gradle
|
||||||
|
cache-dependency-path: __tests__/cache/gradle2/*.gradle*
|
||||||
|
- name: Confirm that ~/.gradle/caches directory has not been made
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.gradle/caches" absent
|
||||||
|
maven1-save:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for maven
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: maven
|
||||||
|
cache-dependency-path: __tests__/cache/maven/pom.xml
|
||||||
|
- name: Create files to cache
|
||||||
|
run: |
|
||||||
|
mvn verify -f __tests__/cache/maven/pom.xml
|
||||||
|
mkdir -p "$HOME/.m2/wrapper/dists/setup-java-e2e-maven1"
|
||||||
|
echo "maven wrapper cache maven1" > "$HOME/.m2/wrapper/dists/setup-java-e2e-maven1/payload"
|
||||||
|
bash __tests__/check-dir.sh "$HOME/.m2/repository"
|
||||||
|
bash __tests__/check-dir.sh "$HOME/.m2/wrapper/dists"
|
||||||
|
maven1-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
needs: maven1-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for maven
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: maven
|
||||||
|
cache-dependency-path: __tests__/cache/maven/pom.xml
|
||||||
|
- name: Confirm that ~/.m2/repository directory has been made
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.m2/repository"
|
||||||
|
- name: Confirm that the Maven Wrapper cache has been restored
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.m2/wrapper/dists"
|
||||||
|
maven2-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
needs: maven1-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for maven
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: maven
|
||||||
|
cache-dependency-path: |
|
||||||
|
__tests__/cache/maven2/pom.xml
|
||||||
|
README.md
|
||||||
|
- name: Confirm that ~/.m2/repository directory has not been made
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.m2/repository" absent
|
||||||
|
sbt1-save:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
working-directory: __tests__/cache/sbt
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-22.04]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for sbt
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: sbt
|
||||||
|
cache-dependency-path: __tests__/cache/sbt/*.sbt
|
||||||
|
- name: Setup SBT
|
||||||
|
if: matrix.os == 'macos-15-intel'
|
||||||
|
run: |
|
||||||
|
echo ""Installing SBT...""
|
||||||
|
brew install sbt
|
||||||
|
- name: Create files to cache
|
||||||
|
run: sbt update
|
||||||
|
|
||||||
|
- name: Check files to cache on macos-latest
|
||||||
|
if: matrix.os == 'macos-15-intel'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/Library/Caches/Coursier"
|
||||||
|
- name: Check files to cache on windows-latest
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/AppData/Local/Coursier/Cache"
|
||||||
|
- name: Check files to cache on ubuntu-latest
|
||||||
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/.cache/coursier"
|
||||||
|
sbt1-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
working-directory: __tests__/cache/sbt
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-22.04]
|
||||||
|
needs: sbt1-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for sbt
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: sbt
|
||||||
|
cache-dependency-path: __tests__/cache/sbt/*.sbt
|
||||||
|
|
||||||
|
- name: Confirm that ~/Library/Caches/Coursier directory has been made
|
||||||
|
if: matrix.os == 'macos-15-intel'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/Library/Caches/Coursier"
|
||||||
|
- name: Confirm that ~/AppData/Local/Coursier/Cache directory has been made
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/AppData/Local/Coursier/Cache"
|
||||||
|
- name: Confirm that ~/.cache/coursier directory has been made
|
||||||
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/.cache/coursier"
|
||||||
|
sbt2-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
working-directory: __tests__/cache/sbt2
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-22.04]
|
||||||
|
needs: sbt1-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for sbt
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: sbt
|
||||||
|
cache-dependency-path: __tests__/cache/sbt2/*.sbt
|
||||||
|
|
||||||
|
- name: Confirm that ~/Library/Caches/Coursier directory has not been made
|
||||||
|
if: matrix.os == 'macos-15-intel'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/Library/Caches/Coursier" absent
|
||||||
|
- name: Confirm that ~/AppData/Local/Coursier/Cache directory has not been made
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/AppData/Local/Coursier/Cache" absent
|
||||||
|
- name: Confirm that ~/.cache/coursier directory has not been made
|
||||||
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/.cache/coursier" absent
|
||||||
|
custom-maven-path-save:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with a custom Maven cache path
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: maven
|
||||||
|
cache-dependency-path: |
|
||||||
|
__tests__/cache/maven2/pom.xml
|
||||||
|
.github/workflows/e2e-cache.yml
|
||||||
|
cache-path: |
|
||||||
|
${{ runner.temp }}/setup-java-custom-maven-repository
|
||||||
|
!${{ runner.temp }}/setup-java-custom-maven-repository/**/*.lastUpdated
|
||||||
|
- name: Populate the custom Maven repository
|
||||||
|
run: |
|
||||||
|
mvn -Dmaven.repo.local="$RUNNER_TEMP/setup-java-custom-maven-repository" verify -f __tests__/cache/maven2/pom.xml
|
||||||
|
touch "$RUNNER_TEMP/setup-java-custom-maven-repository/setup-java-cache-path-marker"
|
||||||
|
bash __tests__/check-dir.sh "$RUNNER_TEMP/setup-java-custom-maven-repository"
|
||||||
|
custom-maven-path-restore:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: custom-maven-path-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with a custom Maven cache path
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: maven
|
||||||
|
cache-dependency-path: |
|
||||||
|
__tests__/cache/maven2/pom.xml
|
||||||
|
.github/workflows/e2e-cache.yml
|
||||||
|
cache-path: |
|
||||||
|
${{ runner.temp }}/setup-java-custom-maven-repository
|
||||||
|
!${{ runner.temp }}/setup-java-custom-maven-repository/**/*.lastUpdated
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Confirm that the custom Maven repository has been restored
|
||||||
|
run: test -f "$RUNNER_TEMP/setup-java-custom-maven-repository/setup-java-cache-path-marker"
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
name: Validate local file
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/*
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
setup-java-local-file-zulu:
|
||||||
|
name: Validate installation from local file Zulu
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Download Zulu OpenJDK file
|
||||||
|
run: |
|
||||||
|
if ($IsLinux) {
|
||||||
|
$downloadUrl = "https://cdn.azul.com/zulu/bin/zulu11.2.3-jdk11.0.1-linux_x64.tar.gz"
|
||||||
|
$localFilename = "java_package.tar.gz"
|
||||||
|
} elseif ($IsMacOS) {
|
||||||
|
$downloadUrl = "https://cdn.azul.com/zulu/bin/zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz"
|
||||||
|
$localFilename = "java_package.tar.gz"
|
||||||
|
} elseif ($IsWindows) {
|
||||||
|
$downloadUrl = "https://cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-win_x64.zip"
|
||||||
|
$localFilename = "java_package.zip"
|
||||||
|
}
|
||||||
|
echo "LocalFilename=$localFilename" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
(New-Object System.Net.WebClient).DownloadFile($downloadUrl, "$env:RUNNER_TEMP/$localFilename")
|
||||||
|
shell: pwsh
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'jdkfile'
|
||||||
|
jdk-file: ${{ runner.temp }}/${{ env.LocalFilename }}
|
||||||
|
java-version: '11.0.0-ea'
|
||||||
|
architecture: x64
|
||||||
|
- name: Verify Java version
|
||||||
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "11.0" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-local-file-temurin:
|
||||||
|
name: Validate installation from local file Eclipse Temurin
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Download Eclipse Temurin file
|
||||||
|
run: |
|
||||||
|
if ($IsLinux) {
|
||||||
|
$downloadUrl = "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.12%2B7/OpenJDK11U-jdk_x64_linux_hotspot_11.0.12_7.tar.gz"
|
||||||
|
$localFilename = "java_package.tar.gz"
|
||||||
|
} elseif ($IsMacOS) {
|
||||||
|
$downloadUrl = "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.12%2B7/OpenJDK11U-jdk_x64_mac_hotspot_11.0.12_7.tar.gz"
|
||||||
|
$localFilename = "java_package.tar.gz"
|
||||||
|
} elseif ($IsWindows) {
|
||||||
|
$downloadUrl = "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.12%2B7/OpenJDK11U-jdk_x64_windows_hotspot_11.0.12_7.zip"
|
||||||
|
$localFilename = "java_package.zip"
|
||||||
|
}
|
||||||
|
echo "LocalFilename=$localFilename" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
(New-Object System.Net.WebClient).DownloadFile($downloadUrl, "$env:RUNNER_TEMP/$localFilename")
|
||||||
|
shell: pwsh
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'jdkfile'
|
||||||
|
# Intentionally uses the deprecated `jdkFile` alias to keep it covered.
|
||||||
|
jdkFile: ${{ runner.temp }}/${{ env.LocalFilename }}
|
||||||
|
java-version: '11.0.0-ea'
|
||||||
|
architecture: x64
|
||||||
|
- name: Verify Java version
|
||||||
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "11.0.12" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
@@ -0,0 +1,176 @@
|
|||||||
|
name: Validate publishing functionality
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/*
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
setup-java-publishing:
|
||||||
|
name: Validate settings.xml
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
server-id: maven
|
||||||
|
server-username-env-var: MAVEN_USERNAME
|
||||||
|
server-password-env-var: MAVEN_CENTRAL_TOKEN
|
||||||
|
gpg-passphrase-env-var: MAVEN_GPG_PASSPHRASE
|
||||||
|
- name: Validate settings.xml
|
||||||
|
run: |
|
||||||
|
$xmlPath = Join-Path $HOME ".m2" "settings.xml"
|
||||||
|
Get-Content $xmlPath | ForEach-Object { Write-Host $_ }
|
||||||
|
|
||||||
|
$content = [System.IO.File]::ReadAllText($xmlPath)
|
||||||
|
$expected = @(
|
||||||
|
'<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"'
|
||||||
|
' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
|
||||||
|
' xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">'
|
||||||
|
' <interactiveMode>false</interactiveMode>'
|
||||||
|
' <servers>'
|
||||||
|
' <server>'
|
||||||
|
' <id>maven</id>'
|
||||||
|
' <username>${env.MAVEN_USERNAME}</username>'
|
||||||
|
' <password>${env.MAVEN_CENTRAL_TOKEN}</password>'
|
||||||
|
' </server>'
|
||||||
|
' </servers>'
|
||||||
|
'</settings>'
|
||||||
|
) -join "`n"
|
||||||
|
|
||||||
|
if ($content -ne $expected) {
|
||||||
|
Write-Host "Expected settings.xml:"
|
||||||
|
$expected -split "`n" | ForEach-Object { Write-Host $_ }
|
||||||
|
throw "Generated XML file is incorrect"
|
||||||
|
}
|
||||||
|
|
||||||
|
test-publishing-overwrite:
|
||||||
|
name: settings.xml is overwritten if flag is true
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Create fake settings.xml
|
||||||
|
run: |
|
||||||
|
$xmlDirectory = Join-Path $HOME ".m2"
|
||||||
|
$xmlPath = Join-Path $xmlDirectory "settings.xml"
|
||||||
|
New-Item -Path $xmlDirectory -ItemType Directory
|
||||||
|
Set-Content -Path $xmlPath -Value "Fake_XML"
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
server-id: maven
|
||||||
|
server-username-env-var: MAVEN_USERNAME
|
||||||
|
server-password-env-var: MAVEN_CENTRAL_TOKEN
|
||||||
|
gpg-passphrase-env-var: MAVEN_GPG_PASSPHRASE
|
||||||
|
- name: Validate settings.xml is overwritten
|
||||||
|
run: |
|
||||||
|
$xmlPath = Join-Path $HOME ".m2" "settings.xml"
|
||||||
|
Get-Content $xmlPath | ForEach-Object { Write-Host $_ }
|
||||||
|
|
||||||
|
$content = Get-Content $xmlPath -Raw
|
||||||
|
if ($content -notlike '*maven*') {
|
||||||
|
throw "settings.xml file is not overwritten"
|
||||||
|
}
|
||||||
|
|
||||||
|
test-publishing-skip-overwrite:
|
||||||
|
name: settings.xml is not overwritten if flag is false
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Create fake settings.xml
|
||||||
|
run: |
|
||||||
|
$xmlDirectory = Join-Path $HOME ".m2"
|
||||||
|
$xmlPath = Join-Path $xmlDirectory "settings.xml"
|
||||||
|
New-Item -Path $xmlDirectory -ItemType Directory
|
||||||
|
Set-Content -Path $xmlPath -Value "Fake_XML"
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
server-id: maven
|
||||||
|
server-username-env-var: MAVEN_USERNAME
|
||||||
|
server-password-env-var: MAVEN_CENTRAL_TOKEN
|
||||||
|
overwrite-settings: false
|
||||||
|
gpg-passphrase-env-var: MAVEN_GPG_PASSPHRASE
|
||||||
|
- name: Validate that settings.xml is not overwritten
|
||||||
|
run: |
|
||||||
|
$xmlPath = Join-Path $HOME ".m2" "settings.xml"
|
||||||
|
$content = Get-Content -Path $xmlPath -Raw
|
||||||
|
Write-Host $content
|
||||||
|
|
||||||
|
if ($content -notlike "*Fake_XML*") {
|
||||||
|
throw "settings.xml file was overwritten but it should not be"
|
||||||
|
}
|
||||||
|
|
||||||
|
test-publishing-custom-location:
|
||||||
|
name: settings.xml in custom location
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
server-id: maven
|
||||||
|
server-username-env-var: MAVEN_USERNAME
|
||||||
|
server-password-env-var: MAVEN_CENTRAL_TOKEN
|
||||||
|
gpg-passphrase-env-var: MAVEN_GPG_PASSPHRASE
|
||||||
|
settings-path: ${{ runner.temp }}
|
||||||
|
- name: Validate settings.xml location
|
||||||
|
run: |
|
||||||
|
$path = Join-Path $env:RUNNER_TEMP "settings.xml"
|
||||||
|
if (-not (Test-Path $path)) {
|
||||||
|
throw "settings.xml file is not found in expected location"
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
name: Validate Java e2e smoke
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
setup-java:
|
||||||
|
name: ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}) - ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: macos-latest
|
||||||
|
distribution: temurin
|
||||||
|
version: '11'
|
||||||
|
java-package: jdk
|
||||||
|
- os: windows-latest
|
||||||
|
distribution: temurin
|
||||||
|
version: '17'
|
||||||
|
java-package: jdk
|
||||||
|
- os: ubuntu-latest
|
||||||
|
distribution: temurin
|
||||||
|
version: '21'
|
||||||
|
java-package: jdk
|
||||||
|
- os: macos-latest
|
||||||
|
distribution: temurin
|
||||||
|
version: '25'
|
||||||
|
java-package: jdk
|
||||||
|
- os: windows-latest
|
||||||
|
distribution: temurin
|
||||||
|
version: '25'
|
||||||
|
java-package: jdk
|
||||||
|
- os: ubuntu-latest
|
||||||
|
distribution: temurin
|
||||||
|
version: '25'
|
||||||
|
java-package: jdk
|
||||||
|
- os: macos-latest
|
||||||
|
distribution: microsoft
|
||||||
|
version: '25'
|
||||||
|
java-package: jdk
|
||||||
|
- os: windows-latest
|
||||||
|
distribution: microsoft
|
||||||
|
version: '25'
|
||||||
|
java-package: jdk
|
||||||
|
- os: ubuntu-latest
|
||||||
|
distribution: microsoft
|
||||||
|
version: '25'
|
||||||
|
java-package: jdk
|
||||||
|
- os: ubuntu-latest
|
||||||
|
distribution: zulu
|
||||||
|
version: '17'
|
||||||
|
java-package: jre
|
||||||
|
- os: ubuntu-latest
|
||||||
|
distribution: liberica
|
||||||
|
version: '21'
|
||||||
|
java-package: jdk+fx
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
java-version: ${{ matrix.version }}
|
||||||
|
java-package: ${{ matrix.java-package }}
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
@@ -0,0 +1,714 @@
|
|||||||
|
name: Validate Java e2e
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- releases/*
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
schedule:
|
||||||
|
- cron: '0 */12 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
setup-java-major-versions:
|
||||||
|
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
distribution:
|
||||||
|
[
|
||||||
|
'temurin',
|
||||||
|
'zulu',
|
||||||
|
'liberica',
|
||||||
|
'microsoft',
|
||||||
|
'semeru',
|
||||||
|
'corretto',
|
||||||
|
'dragonwell',
|
||||||
|
'sapmachine',
|
||||||
|
'jetbrains',
|
||||||
|
'kona',
|
||||||
|
'liberica-nik'
|
||||||
|
]
|
||||||
|
version: ['21', '11', '17']
|
||||||
|
exclude:
|
||||||
|
- distribution: microsoft
|
||||||
|
version: 8
|
||||||
|
- distribution: dragonwell
|
||||||
|
os: macos-15-intel
|
||||||
|
include:
|
||||||
|
- distribution: microsoft
|
||||||
|
os: windows-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: microsoft
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: microsoft
|
||||||
|
os: macos-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: kona
|
||||||
|
os: windows-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: kona
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: kona
|
||||||
|
os: macos-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: liberica-nik
|
||||||
|
os: windows-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: liberica-nik
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: liberica-nik
|
||||||
|
os: macos-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: oracle
|
||||||
|
os: macos-15-intel
|
||||||
|
version: 17
|
||||||
|
- distribution: oracle
|
||||||
|
os: windows-latest
|
||||||
|
version: 21
|
||||||
|
- distribution: oracle
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: 21
|
||||||
|
- distribution: oracle-openjdk
|
||||||
|
os: macos-15-intel
|
||||||
|
version: 21
|
||||||
|
- distribution: oracle-openjdk
|
||||||
|
os: windows-latest
|
||||||
|
version: 21
|
||||||
|
- distribution: oracle-openjdk
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: 21
|
||||||
|
- distribution: graalvm
|
||||||
|
os: macos-latest
|
||||||
|
version: 17.0.12
|
||||||
|
- distribution: graalvm
|
||||||
|
os: windows-latest
|
||||||
|
version: 21
|
||||||
|
- distribution: graalvm
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: 21
|
||||||
|
- distribution: graalvm
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: '24-ea'
|
||||||
|
steps:
|
||||||
|
- &checkout_step
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
java-version: ${{ matrix.version }}
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-checksum-verification:
|
||||||
|
name: Corretto checksum verification - ubuntu-latest
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: setup-java with forced download
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
java-version: '21'
|
||||||
|
distribution: corretto
|
||||||
|
force-download: true
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_VERSION: '21'
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-alpine-linux:
|
||||||
|
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - alpine-linux - ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
container:
|
||||||
|
image: alpine:3.21
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest]
|
||||||
|
distribution: ['temurin', 'sapmachine']
|
||||||
|
version: ['21', '17']
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: Install bash
|
||||||
|
run: apk add --no-cache bash
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
java-version: ${{ matrix.version }}
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-major-minor-versions:
|
||||||
|
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }}
|
||||||
|
needs: setup-java-major-versions
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: &default_os [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
distribution: ['temurin', 'zulu', 'liberica']
|
||||||
|
version:
|
||||||
|
- '11.0'
|
||||||
|
- '21.0'
|
||||||
|
- '17.0.7+7'
|
||||||
|
include:
|
||||||
|
- distribution: oracle
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: '21.0.4'
|
||||||
|
- distribution: graalvm
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: '21.0.4'
|
||||||
|
- distribution: dragonwell
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: '11.0'
|
||||||
|
- distribution: dragonwell
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: '11.0.13+9'
|
||||||
|
- distribution: sapmachine
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: '17.0.7'
|
||||||
|
- distribution: jetbrains
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: '11.0.11'
|
||||||
|
- distribution: jetbrains
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: '17.0.7'
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
java-version: ${{ matrix.version }}
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-check-latest:
|
||||||
|
name: ${{ matrix.distribution }} ${{ matrix.version }} - check-latest flag - ${{ matrix.os }}
|
||||||
|
needs: setup-java-major-versions
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: *default_os
|
||||||
|
distribution:
|
||||||
|
[
|
||||||
|
'temurin',
|
||||||
|
'zulu',
|
||||||
|
'liberica',
|
||||||
|
'dragonwell',
|
||||||
|
'sapmachine',
|
||||||
|
'jetbrains'
|
||||||
|
]
|
||||||
|
exclude:
|
||||||
|
- distribution: dragonwell
|
||||||
|
os: macos-latest
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
java-version: 11
|
||||||
|
check-latest: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "11" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-multiple-jdks:
|
||||||
|
name: ${{ matrix.distribution }} ${{ matrix.version }} - multiple jdks - ${{ matrix.os }}
|
||||||
|
needs: setup-java-major-versions
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: *default_os
|
||||||
|
distribution:
|
||||||
|
[
|
||||||
|
'temurin',
|
||||||
|
'zulu',
|
||||||
|
'liberica',
|
||||||
|
'dragonwell',
|
||||||
|
'sapmachine',
|
||||||
|
'jetbrains'
|
||||||
|
]
|
||||||
|
exclude:
|
||||||
|
- distribution: dragonwell
|
||||||
|
os: macos-latest
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
java-version: |
|
||||||
|
11
|
||||||
|
17
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Verify Java env variables
|
||||||
|
run: |
|
||||||
|
$javaArch = if ($env:RUNNER_ARCH -eq "ARM64") { "AARCH64" } else { $env:RUNNER_ARCH }
|
||||||
|
$versionsArr = "11","17"
|
||||||
|
foreach ($version in $versionsArr)
|
||||||
|
{
|
||||||
|
$envName = "JAVA_HOME_${version}_${javaArch}"
|
||||||
|
$JavaVersionPath = [Environment]::GetEnvironmentVariable($envName)
|
||||||
|
if (-not (Test-Path "$JavaVersionPath")) {
|
||||||
|
Write-Host "$envName is not found"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
shell: pwsh
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "17" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-ea-versions:
|
||||||
|
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }}
|
||||||
|
needs: setup-java-major-minor-versions
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- {os: macos-15-intel, version: '17-ea', distribution: zulu}
|
||||||
|
- {os: windows-latest, version: '17-ea', distribution: zulu}
|
||||||
|
- {os: ubuntu-latest, version: '17-ea', distribution: zulu}
|
||||||
|
- {os: macos-15-intel, version: '15.0.0-ea.14', distribution: zulu}
|
||||||
|
- {os: windows-latest, version: '15.0.0-ea.14', distribution: zulu}
|
||||||
|
- {os: ubuntu-latest, version: '15.0.0-ea.14', distribution: zulu}
|
||||||
|
- {os: macos-latest, version: '17-ea', distribution: temurin}
|
||||||
|
- {os: windows-latest, version: '17-ea', distribution: temurin}
|
||||||
|
- {os: ubuntu-latest, version: '17-ea', distribution: temurin}
|
||||||
|
- {os: macos-latest, version: '17-ea', distribution: sapmachine}
|
||||||
|
- {os: windows-latest, version: '17-ea', distribution: sapmachine}
|
||||||
|
- {os: ubuntu-latest, version: '17-ea', distribution: sapmachine}
|
||||||
|
- {os: macos-latest, version: '21-ea', distribution: sapmachine}
|
||||||
|
- {os: windows-latest, version: '21-ea', distribution: sapmachine}
|
||||||
|
- {os: ubuntu-latest, version: '21-ea', distribution: sapmachine}
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
java-version: ${{ matrix.version }}
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-signature-verification:
|
||||||
|
name: ${{ matrix.distribution }} ${{ matrix.version }} signature verification - ${{ matrix.os }}
|
||||||
|
needs: setup-java-major-minor-versions
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: *default_os
|
||||||
|
version: ['21', '17']
|
||||||
|
distribution: [temurin, microsoft]
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: setup-java with signature verification
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
java-version: ${{ matrix.version }}
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
verify-signature: true
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-custom-package-type:
|
||||||
|
name: ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }}
|
||||||
|
needs: setup-java-major-minor-versions
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
distribution:
|
||||||
|
['temurin', 'zulu', 'liberica', 'semeru', 'sapmachine', 'jetbrains']
|
||||||
|
java-package: ['jre']
|
||||||
|
version: ['17.0']
|
||||||
|
include:
|
||||||
|
- distribution: 'zulu'
|
||||||
|
java-package: jre+fx
|
||||||
|
version: '21'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'zulu'
|
||||||
|
java-package: jdk+fx
|
||||||
|
version: '21.0'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'liberica'
|
||||||
|
java-package: jdk+fx
|
||||||
|
version: '21'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'liberica'
|
||||||
|
java-package: jre+fx
|
||||||
|
version: '11'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'liberica-nik'
|
||||||
|
java-package: jdk+fx
|
||||||
|
version: '21'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'corretto'
|
||||||
|
java-package: jre
|
||||||
|
version: '8'
|
||||||
|
os: windows-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jdk+jcef
|
||||||
|
version: '11'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jdk+jcef
|
||||||
|
version: '17'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jdk+jcef
|
||||||
|
version: '21'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jre+jcef
|
||||||
|
version: '11'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jre+jcef
|
||||||
|
version: '17'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jre+jcef
|
||||||
|
version: '21'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jdk+ft
|
||||||
|
version: '17'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jdk+ft
|
||||||
|
version: '21'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jre+ft
|
||||||
|
version: '17'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jre+ft
|
||||||
|
version: '21'
|
||||||
|
os: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
java-version: ${{ matrix.version }}
|
||||||
|
java-package: ${{ matrix.java-package }}
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
# Only Liberica and Zulu provide x86
|
||||||
|
setup-java-x86:
|
||||||
|
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ matrix.architecture }}) - ${{ matrix.os }}
|
||||||
|
needs: setup-java-major-minor-versions
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
# x86 is not supported on macOS
|
||||||
|
os: [windows-latest, ubuntu-22.04]
|
||||||
|
distribution: ['liberica', 'zulu', 'corretto']
|
||||||
|
version: ['11']
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
java-version: ${{ matrix.version }}
|
||||||
|
architecture: 'x86'
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-unsupported-platform:
|
||||||
|
name: Reject unsupported Oracle x86 on Linux
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: Attempt unsupported setup
|
||||||
|
id: unsupported-setup
|
||||||
|
continue-on-error: true
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
distribution: oracle
|
||||||
|
java-version: '21'
|
||||||
|
architecture: x86
|
||||||
|
- name: Verify setup was rejected
|
||||||
|
if: always()
|
||||||
|
env:
|
||||||
|
SETUP_OUTCOME: ${{ steps.unsupported-setup.outcome }}
|
||||||
|
run: test "$SETUP_OUTCOME" = failure
|
||||||
|
|
||||||
|
setup-java-version-both-version-inputs-presents:
|
||||||
|
name: ${{ matrix.distribution }} version (should be from input) - ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: *default_os
|
||||||
|
distribution: ['temurin', 'microsoft', 'corretto']
|
||||||
|
java-version-file: ['.java-version', '.tool-versions']
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: Create .java-version file
|
||||||
|
shell: bash
|
||||||
|
run: echo "17" > .java-version
|
||||||
|
- name: Create .tool-versions file
|
||||||
|
shell: bash
|
||||||
|
run: echo "java 17" > .tool-versions
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
java-version: 11
|
||||||
|
java-version-file: ${{matrix.java-version-file }}
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "11" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-version-from-file-major-notation:
|
||||||
|
name: ${{ matrix.distribution }} version from file X - ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: *default_os
|
||||||
|
distribution: ['temurin', 'zulu', 'liberica', 'microsoft', 'corretto']
|
||||||
|
java-version-file: ['.java-version', '.tool-versions']
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: Create .java-version file
|
||||||
|
shell: bash
|
||||||
|
run: echo "11" > .java-version
|
||||||
|
- name: Create .tool-versions file
|
||||||
|
shell: bash
|
||||||
|
run: echo "java 11" > .tool-versions
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
java-version-file: ${{matrix.java-version-file }}
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "11" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-version-from-file-major-minor-patch-notation:
|
||||||
|
name: ${{ matrix.distribution }} version from file X.Y.Z - ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: *default_os
|
||||||
|
distribution: ['temurin', 'zulu']
|
||||||
|
java-version-file: ['.java-version', '.tool-versions']
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: Create .java-version file
|
||||||
|
shell: bash
|
||||||
|
run: echo "17.0.10" > .java-version
|
||||||
|
- name: Create .tool-versions file
|
||||||
|
shell: bash
|
||||||
|
run: echo "java 17.0.10" > .tool-versions
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
java-version-file: ${{matrix.java-version-file }}
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "17.0.10" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-version-from-file-major-minor-patch-with-dist:
|
||||||
|
name: ${{ matrix.distribution }} version from file '${{ matrix.java-version-file }}' - ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: *default_os
|
||||||
|
distribution: ['temurin', 'zulu', 'liberica']
|
||||||
|
java-version-file: ['.java-version', '.tool-versions', '.sdkmanrc']
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: Create .java-version file
|
||||||
|
shell: bash
|
||||||
|
run: echo "openjdk64-17.0.10" > .java-version
|
||||||
|
- name: Create .tool-versions file
|
||||||
|
shell: bash
|
||||||
|
run: echo "java openjdk64-17.0.10" > .tool-versions
|
||||||
|
- name: Create .sdkmanrc file
|
||||||
|
shell: bash
|
||||||
|
run: echo "java=17.0.10-tem" > .sdkmanrc
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
java-version-file: ${{matrix.java-version-file }}
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "17.0.10" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-set-default:
|
||||||
|
name: set-default option - ${{ matrix.os }}
|
||||||
|
needs: setup-java-major-versions
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: *default_os
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: Setup Java 17 as default
|
||||||
|
uses: ./
|
||||||
|
id: setup-java-17
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '17'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Setup Java 21 without setting as default
|
||||||
|
uses: ./
|
||||||
|
id: setup-java-21
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '21'
|
||||||
|
set-default: false
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Verify JAVA_HOME still points to Java 17
|
||||||
|
env:
|
||||||
|
JAVA_17_PATH: ${{ steps.setup-java-17.outputs.path }}
|
||||||
|
run: |
|
||||||
|
echo "JAVA_HOME=$JAVA_HOME"
|
||||||
|
echo "Java 17 path=$JAVA_17_PATH"
|
||||||
|
if [ "$JAVA_HOME" != "$JAVA_17_PATH" ]; then
|
||||||
|
echo "JAVA_HOME should still point to Java 17"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
- name: Verify java -version reports Java 17
|
||||||
|
run: |
|
||||||
|
JAVA_VERSION=$(java -version 2>&1 | head -1)
|
||||||
|
echo "java -version: $JAVA_VERSION"
|
||||||
|
if ! echo "$JAVA_VERSION" | grep -q "17"; then
|
||||||
|
echo "Default java should still be version 17"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
- name: Verify JAVA_HOME_21 env var is set
|
||||||
|
run: |
|
||||||
|
$javaArch = if ($env:RUNNER_ARCH -eq "ARM64") { "AARCH64" } else { $env:RUNNER_ARCH }
|
||||||
|
$envName = "JAVA_HOME_21_${javaArch}"
|
||||||
|
$JavaVersionPath = [Environment]::GetEnvironmentVariable($envName)
|
||||||
|
if (-not $JavaVersionPath) {
|
||||||
|
Write-Host "$envName is not set"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
if (-not (Test-Path "$JavaVersionPath")) {
|
||||||
|
Write-Host "$envName path does not exist: $JavaVersionPath"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
Write-Host "$envName=$JavaVersionPath"
|
||||||
|
shell: pwsh
|
||||||
|
- name: Verify Java 21 outputs are set
|
||||||
|
env:
|
||||||
|
JAVA_21_PATH: ${{ steps.setup-java-21.outputs.path }}
|
||||||
|
JAVA_21_VERSION: ${{ steps.setup-java-21.outputs.version }}
|
||||||
|
run: |
|
||||||
|
echo "Java 21 path=$JAVA_21_PATH"
|
||||||
|
echo "Java 21 version=$JAVA_21_VERSION"
|
||||||
|
if [ -z "$JAVA_21_PATH" ]; then
|
||||||
|
echo "Java 21 path output should be set"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ -z "$JAVA_21_VERSION" ]; then
|
||||||
|
echo "Java 21 version output should be set"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
name: Licensed
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-licensed:
|
||||||
|
name: Licensed
|
||||||
|
uses: actions/reusable-workflows/.github/workflows/licensed.yml@main
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
name: 'Publish Immutable Action Version'
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [released]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checking out
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Publish
|
||||||
|
id: publish
|
||||||
|
uses: actions/publish-immutable-action@v0.0.4
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
name: Release new action version
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [released]
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
TAG_NAME:
|
||||||
|
description: 'Tag name that the major tag will point to'
|
||||||
|
required: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
TAG_NAME: ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }}
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update_tag:
|
||||||
|
name: Update the major tag to include the ${{ github.event.inputs.TAG_NAME || github.event.release.tag_name }} changes
|
||||||
|
environment:
|
||||||
|
name: releaseNewActionVersion
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Update the ${{ env.TAG_NAME }} tag
|
||||||
|
id: update-major-tag
|
||||||
|
uses: actions/publish-action@v0.4.0
|
||||||
|
with:
|
||||||
|
source-tag: ${{ env.TAG_NAME }}
|
||||||
|
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
name: Update configuration files
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 3 * * 0'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-update-configuration-files:
|
||||||
|
name: Update configuration files
|
||||||
|
permissions:
|
||||||
|
contents: write # to push the branch with updated configuration files
|
||||||
|
pull-requests: write # to open/update the configuration update PR
|
||||||
|
uses: actions/reusable-workflows/.github/workflows/update-config-files.yml@main
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
name: Main workflow
|
|
||||||
on: [push, pull_request]
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ${{ matrix.operating-system }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
operating-system: [ubuntu-latest, windows-latest]
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Setup Node.js 12
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: 12.x
|
|
||||||
- name: npm install
|
|
||||||
run: npm install
|
|
||||||
- name: Lint
|
|
||||||
run: npm run format-check
|
|
||||||
- name: npm test
|
|
||||||
run: npm test
|
|
||||||
|
|
||||||
test:
|
|
||||||
runs-on: ${{ matrix.operating-system }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
operating-system: [ubuntu-latest, windows-latest]
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Clear tool cache
|
|
||||||
if: runner.os != 'windows'
|
|
||||||
run: mv "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old"
|
|
||||||
- name: Clear tool cache (Windows)
|
|
||||||
if: runner.os == 'windows'
|
|
||||||
run: move "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old"
|
|
||||||
- name: Setup Java 13
|
|
||||||
id: setup-java
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
java-version: 13.0.2
|
|
||||||
- name: Verify Java 13
|
|
||||||
if: runner.os != 'windows'
|
|
||||||
run: __tests__/verify-java.sh 13.0.2 "${{ steps.setup-java.outputs.path }}" "${{ steps.setup-java.outputs.version }}"
|
|
||||||
- name: Verify Java 13 (Windows)
|
|
||||||
if: runner.os == 'windows'
|
|
||||||
run: __tests__/verify-java.ps1 13.0.2 "${{ steps.setup-java.outputs.path }}" "${{ steps.setup-java.outputs.version }}"
|
|
||||||
|
|
||||||
test-proxy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: ubuntu:latest
|
|
||||||
options: --dns 127.0.0.1
|
|
||||||
services:
|
|
||||||
squid-proxy:
|
|
||||||
image: datadog/squid:latest
|
|
||||||
ports:
|
|
||||||
- 3128:3128
|
|
||||||
env:
|
|
||||||
https_proxy: http://squid-proxy:3128
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Clear tool cache
|
|
||||||
run: rm -rf $RUNNER_TOOL_CACHE/*
|
|
||||||
- name: Setup Java 13
|
|
||||||
id: setup-java
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
java-version: 13.0.2
|
|
||||||
- name: Verify Java 13
|
|
||||||
run: __tests__/verify-java.sh 13.0.2 "${{ steps.setup-java.outputs.path }}" "${{ steps.setup-java.outputs.version }}"
|
|
||||||
|
|
||||||
test-bypass-proxy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
https_proxy: http://no-such-proxy:3128
|
|
||||||
no_proxy: github.com,static.azul.com
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Clear tool cache
|
|
||||||
run: rm -rf $RUNNER_TOOL_CACHE/*
|
|
||||||
- name: Setup Java 13
|
|
||||||
id: setup-java
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
java-version: 13.0.2
|
|
||||||
- name: Verify Java 13
|
|
||||||
run: __tests__/verify-java.sh 13.0.2 "${{ steps.setup-java.outputs.path }}" "${{ steps.setup-java.outputs.version }}"
|
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
name: Security analysis with zizmor
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/*
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
zizmor:
|
||||||
|
name: Analyze workflows with zizmor
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write # to upload SARIF results to code scanning
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v7
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
|
|
||||||
|
- name: Install zizmor
|
||||||
|
run: pip install zizmor
|
||||||
|
|
||||||
|
- name: Run zizmor
|
||||||
|
run: zizmor --format sarif .github/workflows/ > zizmor.sarif
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Upload SARIF results to code scanning
|
||||||
|
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
|
||||||
|
uses: github/codeql-action/upload-sarif@v4
|
||||||
|
with:
|
||||||
|
sarif_file: zizmor.sarif
|
||||||
|
category: zizmor
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# Configuration for zizmor (https://docs.zizmor.sh)
|
||||||
|
rules:
|
||||||
|
unpinned-uses:
|
||||||
|
config:
|
||||||
|
# First-party GitHub-maintained actions are trusted and referenced by
|
||||||
|
# major-version tags (the convention used across the actions org).
|
||||||
|
# Any third-party action must be pinned to a full commit SHA.
|
||||||
|
policies:
|
||||||
|
actions/*: ref-pin
|
||||||
|
github/*: ref-pin
|
||||||
|
'*': hash-pin
|
||||||
@@ -94,3 +94,6 @@ typings/
|
|||||||
# DynamoDB Local files
|
# DynamoDB Local files
|
||||||
.dynamodb/
|
.dynamodb/
|
||||||
.vscode/
|
.vscode/
|
||||||
|
|
||||||
|
# IntelliJ / WebStorm
|
||||||
|
/.idea/
|
||||||
|
|||||||
Executable
+1
@@ -0,0 +1 @@
|
|||||||
|
npx lint-staged
|
||||||
Executable
+1
@@ -0,0 +1 @@
|
|||||||
|
npm run build && npm test
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
sources:
|
||||||
|
npm: true
|
||||||
|
|
||||||
|
allowed:
|
||||||
|
- apache-2.0
|
||||||
|
- 0bsd
|
||||||
|
- bsd-2-clause
|
||||||
|
- bsd-3-clause
|
||||||
|
- isc
|
||||||
|
- mit
|
||||||
|
- cc0-1.0
|
||||||
|
- unlicense
|
||||||
|
- blueoak-1.0.0
|
||||||
|
|
||||||
|
reviewed:
|
||||||
|
npm:
|
||||||
|
- "@actions/http-client" # MIT (license text present), but detected as "other"
|
||||||
|
- "argparse" # Python Software Foundation License (PSF), but detected as "other"
|
||||||
|
- "balanced-match"
|
||||||
|
- "brace-expansion"
|
||||||
Generated
+20
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: "@actions/cache"
|
||||||
|
version: 6.2.0
|
||||||
|
type: npm
|
||||||
|
summary: Actions cache lib
|
||||||
|
homepage: https://github.com/actions/toolkit/tree/main/packages/cache
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE.md
|
||||||
|
text: |-
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright 2019 GitHub
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+20
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: "@actions/core"
|
||||||
|
version: 3.0.1
|
||||||
|
type: npm
|
||||||
|
summary: Actions core lib
|
||||||
|
homepage: https://github.com/actions/toolkit/tree/main/packages/core
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE.md
|
||||||
|
text: |-
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright 2019 GitHub
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+20
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: "@actions/exec"
|
||||||
|
version: 3.0.0
|
||||||
|
type: npm
|
||||||
|
summary: Actions exec lib
|
||||||
|
homepage: https://github.com/actions/toolkit/tree/main/packages/exec
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE.md
|
||||||
|
text: |-
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright 2019 GitHub
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+20
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: "@actions/glob"
|
||||||
|
version: 0.7.0
|
||||||
|
type: npm
|
||||||
|
summary: Actions glob lib
|
||||||
|
homepage: https://github.com/actions/toolkit/tree/main/packages/glob
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE.md
|
||||||
|
text: |-
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright 2019 GitHub
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
notices: []
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: "@actions/http-client"
|
||||||
|
version: 4.0.1
|
||||||
|
type: npm
|
||||||
|
summary: Actions Http Client
|
||||||
|
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
|
||||||
|
license: other
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
Actions Http Client for Node.js
|
||||||
|
|
||||||
|
Copyright (c) GitHub, Inc.
|
||||||
|
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||||
|
associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||||
|
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+20
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: "@actions/io"
|
||||||
|
version: 3.0.2
|
||||||
|
type: npm
|
||||||
|
summary: Actions io lib
|
||||||
|
homepage: https://github.com/actions/toolkit/tree/main/packages/io
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE.md
|
||||||
|
text: |-
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright 2019 GitHub
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
notices: []
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: "@actions/tool-cache"
|
||||||
|
version: 4.0.0
|
||||||
|
type: npm
|
||||||
|
summary: Actions tool-cache lib
|
||||||
|
homepage: https://github.com/actions/toolkit/tree/main/packages/tool-cache
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE.md
|
||||||
|
text: |-
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright 2019 GitHub
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
notices: []
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: "@azure/abort-controller"
|
||||||
|
version: 2.2.0
|
||||||
|
type: npm
|
||||||
|
summary: Microsoft Azure SDK for JavaScript - Aborter
|
||||||
|
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/abort-controller/README.md
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+33
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
name: "@azure/core-auth"
|
||||||
|
version: 1.11.0
|
||||||
|
type: npm
|
||||||
|
summary: Provides low-level interfaces and helper methods for authentication in Azure
|
||||||
|
SDK
|
||||||
|
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-auth/README.md
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: "@azure/core-client"
|
||||||
|
version: 1.11.0
|
||||||
|
type: npm
|
||||||
|
summary: Core library for interfacing with AutoRest generated code
|
||||||
|
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-client/
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: "@azure/core-http-compat"
|
||||||
|
version: 2.5.0
|
||||||
|
type: npm
|
||||||
|
summary: Core HTTP Compatibility Library to bridge the gap between Core V1 & V2 packages.
|
||||||
|
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-http-compat/
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+33
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
name: "@azure/core-lro"
|
||||||
|
version: 2.7.2
|
||||||
|
type: npm
|
||||||
|
summary: Isomorphic client library for supporting long-running operations in node.js
|
||||||
|
and browser.
|
||||||
|
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-lro/README.md
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2020 Microsoft
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: "@azure/core-paging"
|
||||||
|
version: 1.7.0
|
||||||
|
type: npm
|
||||||
|
summary: Core types for paging async iterable iterators
|
||||||
|
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-paging/README.md
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: "@azure/core-rest-pipeline"
|
||||||
|
version: 1.25.0
|
||||||
|
type: npm
|
||||||
|
summary: Isomorphic client library for making HTTP requests in node.js and browser.
|
||||||
|
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-rest-pipeline/README.md
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: "@azure/core-tracing"
|
||||||
|
version: 1.4.0
|
||||||
|
type: npm
|
||||||
|
summary: Provides low-level interfaces and helper methods for tracing in Azure SDK
|
||||||
|
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-tracing/README.md
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: "@azure/core-util"
|
||||||
|
version: 1.14.0
|
||||||
|
type: npm
|
||||||
|
summary: Core library for shared utility methods
|
||||||
|
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-util/
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: "@azure/core-xml"
|
||||||
|
version: 1.6.0
|
||||||
|
type: npm
|
||||||
|
summary: Core library for interacting with XML payloads
|
||||||
|
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/core-xml/README.md
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: "@azure/logger"
|
||||||
|
version: 1.4.0
|
||||||
|
type: npm
|
||||||
|
summary: Microsoft Azure SDK for JavaScript - Logger
|
||||||
|
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger/README.md
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: "@azure/storage-blob"
|
||||||
|
version: 12.33.0
|
||||||
|
type: npm
|
||||||
|
summary: Microsoft Azure Storage SDK for JavaScript - Blob
|
||||||
|
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-blob/README.md
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: "@azure/storage-common"
|
||||||
|
version: 12.4.1
|
||||||
|
type: npm
|
||||||
|
summary: Azure Storage Common Client Library for JavaScript
|
||||||
|
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/storage/storage-common/README.md
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |-
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2018 Microsoft
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+11
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
name: "@nodable/entities"
|
||||||
|
version: 3.0.0
|
||||||
|
type: npm
|
||||||
|
summary: Entity parser for XML, HTML, External entites with security and NCR control
|
||||||
|
homepage:
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: README.md
|
||||||
|
text: MIT
|
||||||
|
notices: []
|
||||||
+185
@@ -0,0 +1,185 @@
|
|||||||
|
---
|
||||||
|
name: "@protobuf-ts/runtime-rpc"
|
||||||
|
version: 2.11.1
|
||||||
|
type: npm
|
||||||
|
summary: Runtime library for RPC clients generated by the protoc plugin "protobuf-ts"
|
||||||
|
homepage: https://github.com/timostamm/protobuf-ts
|
||||||
|
license: apache-2.0
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |2
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
notices: []
|
||||||
+185
@@ -0,0 +1,185 @@
|
|||||||
|
---
|
||||||
|
name: "@protobuf-ts/runtime"
|
||||||
|
version: 2.11.1
|
||||||
|
type: npm
|
||||||
|
summary: Runtime library for code generated by the protoc plugin "protobuf-ts"
|
||||||
|
homepage: https://github.com/timostamm/protobuf-ts
|
||||||
|
license: apache-2.0
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |2
|
||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
notices: []
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: "@typespec/ts-http-runtime"
|
||||||
|
version: 0.3.7
|
||||||
|
type: npm
|
||||||
|
summary: Isomorphic client library for making HTTP requests in node.js and browser.
|
||||||
|
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/ts-http-runtime/README.md
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+33
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
name: agent-base
|
||||||
|
version: 7.1.4
|
||||||
|
type: npm
|
||||||
|
summary: Turn a function into an `http.Agent` instance
|
||||||
|
homepage:
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |-
|
||||||
|
(The MIT License)
|
||||||
|
|
||||||
|
Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
'Software'), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+35
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
name: anynum
|
||||||
|
version: 1.0.1
|
||||||
|
type: npm
|
||||||
|
summary: Normalize all Unicode decimal digits (Devanagari, Arabic, Thai, etc.) to
|
||||||
|
ASCII numerals. Zero dependencies, performance-first.
|
||||||
|
homepage:
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Natural Intelligence
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
- sources: README.md
|
||||||
|
text: MIT
|
||||||
|
notices: []
|
||||||
Generated
+34
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
name: balanced-match
|
||||||
|
version: 4.0.4
|
||||||
|
type: npm
|
||||||
|
summary: Match balanced character pairs, like "{" and "}"
|
||||||
|
homepage:
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE.md
|
||||||
|
text: |
|
||||||
|
(MIT)
|
||||||
|
|
||||||
|
Original code Copyright Julian Gruber <julian@juliangruber.com>
|
||||||
|
|
||||||
|
Port to TypeScript Copyright Isaac Z. Schlueter <i@izs.me>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||||
|
of the Software, and to permit persons to whom the Software is furnished to do
|
||||||
|
so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+34
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
name: brace-expansion
|
||||||
|
version: 5.0.9
|
||||||
|
type: npm
|
||||||
|
summary: Brace expansion as known from sh/bash
|
||||||
|
homepage:
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright Julian Gruber <julian@juliangruber.com>
|
||||||
|
|
||||||
|
TypeScript port Copyright Isaac Z. Schlueter <i@izs.me>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+56
@@ -0,0 +1,56 @@
|
|||||||
|
---
|
||||||
|
name: debug
|
||||||
|
version: 4.4.3
|
||||||
|
type: npm
|
||||||
|
summary: Lightweight debugging utility for Node.js and the browser
|
||||||
|
homepage:
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |+
|
||||||
|
(The MIT License)
|
||||||
|
|
||||||
|
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
|
||||||
|
Copyright (c) 2018-2021 Josh Junon
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||||
|
and associated documentation files (the 'Software'), to deal in the Software without restriction,
|
||||||
|
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||||
|
portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||||
|
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
- sources: README.md
|
||||||
|
text: |-
|
||||||
|
(The MIT License)
|
||||||
|
|
||||||
|
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
|
||||||
|
Copyright (c) 2018-2021 Josh Junon
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
'Software'), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+38
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
name: events
|
||||||
|
version: 3.3.0
|
||||||
|
type: npm
|
||||||
|
summary: Node's event emitter for all engines.
|
||||||
|
homepage: https://github.com/Gozala/events#readme
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
MIT
|
||||||
|
|
||||||
|
Copyright Joyent, Inc. and other Node contributors.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||||
|
persons to whom the Software is furnished to do so, subject to the
|
||||||
|
following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included
|
||||||
|
in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||||
|
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||||
|
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||||
|
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||||
|
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
- sources: Readme.md
|
||||||
|
text: |-
|
||||||
|
[MIT](./LICENSE)
|
||||||
|
|
||||||
|
[node.js docs]: https://nodejs.org/dist/v11.13.0/docs/api/events.html
|
||||||
|
notices: []
|
||||||
Generated
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: fast-xml-builder
|
||||||
|
version: 1.3.0
|
||||||
|
type: npm
|
||||||
|
summary: Build XML from JSON without C/C++ based libraries
|
||||||
|
homepage:
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Natural Intelligence
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+37
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
name: fast-xml-parser
|
||||||
|
version: 5.10.1
|
||||||
|
type: npm
|
||||||
|
summary: Validate XML, Parse XML, Build XML without C/C++ based libraries
|
||||||
|
homepage:
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2017 Amit Kumar Gupta
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
- sources: README.md
|
||||||
|
text: |-
|
||||||
|
* MIT License
|
||||||
|
|
||||||
|

|
||||||
|
notices: []
|
||||||
Generated
+33
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
name: http-proxy-agent
|
||||||
|
version: 7.0.2
|
||||||
|
type: npm
|
||||||
|
summary: An HTTP(s) proxy `http.Agent` implementation for HTTP
|
||||||
|
homepage:
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
(The MIT License)
|
||||||
|
|
||||||
|
Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
'Software'), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+33
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
name: https-proxy-agent
|
||||||
|
version: 7.0.6
|
||||||
|
type: npm
|
||||||
|
summary: An HTTP(s) proxy `http.Agent` implementation for HTTPS
|
||||||
|
homepage:
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |-
|
||||||
|
(The MIT License)
|
||||||
|
|
||||||
|
Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
'Software'), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+35
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
name: is-unsafe
|
||||||
|
version: 2.0.0
|
||||||
|
type: npm
|
||||||
|
summary: Zero-dependency, DOM-free, pure predicate for detecting unsafe strings across
|
||||||
|
HTML, XML, SVG, SQL, SHELL, and REGEX contexts
|
||||||
|
homepage:
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Natural Intelligence
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
- sources: README.md
|
||||||
|
text: MIT
|
||||||
|
notices: []
|
||||||
Generated
+66
@@ -0,0 +1,66 @@
|
|||||||
|
---
|
||||||
|
name: minimatch
|
||||||
|
version: 10.2.6
|
||||||
|
type: npm
|
||||||
|
summary: a glob matcher in javascript
|
||||||
|
homepage:
|
||||||
|
license: blueoak-1.0.0
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE.md
|
||||||
|
text: |
|
||||||
|
# Blue Oak Model License
|
||||||
|
|
||||||
|
Version 1.0.0
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
|
||||||
|
This license gives everyone as much permission to work with
|
||||||
|
this software as possible, while protecting contributors
|
||||||
|
from liability.
|
||||||
|
|
||||||
|
## Acceptance
|
||||||
|
|
||||||
|
In order to receive this license, you must agree to its
|
||||||
|
rules. The rules of this license are both obligations
|
||||||
|
under that agreement and conditions to your license.
|
||||||
|
You must not do anything with this software that triggers
|
||||||
|
a rule that you cannot or will not follow.
|
||||||
|
|
||||||
|
## Copyright
|
||||||
|
|
||||||
|
Each contributor licenses you to do everything with this
|
||||||
|
software that would otherwise infringe that contributor's
|
||||||
|
copyright in it.
|
||||||
|
|
||||||
|
## Notices
|
||||||
|
|
||||||
|
You must ensure that everyone who gets a copy of
|
||||||
|
any part of this software from you, with or without
|
||||||
|
changes, also gets the text of this license or a link to
|
||||||
|
<https://blueoakcouncil.org/license/1.0.0>.
|
||||||
|
|
||||||
|
## Excuse
|
||||||
|
|
||||||
|
If anyone notifies you in writing that you have not
|
||||||
|
complied with [Notices](#notices), you can keep your
|
||||||
|
license by taking all practical steps to comply within 30
|
||||||
|
days after the notice. If you do not do so, your license
|
||||||
|
ends immediately.
|
||||||
|
|
||||||
|
## Patent
|
||||||
|
|
||||||
|
Each contributor licenses you to do everything with this
|
||||||
|
software that would otherwise infringe any patent claims
|
||||||
|
they can license or become able to license.
|
||||||
|
|
||||||
|
## Reliability
|
||||||
|
|
||||||
|
No contributor can revoke this license.
|
||||||
|
|
||||||
|
## No Liability
|
||||||
|
|
||||||
|
**_As far as the law allows, this software comes as is,
|
||||||
|
without any warranty or condition, and no contributor
|
||||||
|
will be liable to anyone for any damages related to this
|
||||||
|
software or this license, under any kind of legal claim._**
|
||||||
|
notices: []
|
||||||
Generated
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: ms
|
||||||
|
version: 2.1.3
|
||||||
|
type: npm
|
||||||
|
summary: Tiny millisecond conversion utility
|
||||||
|
homepage:
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: license.md
|
||||||
|
text: |
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2020 Vercel, Inc.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: path-expression-matcher
|
||||||
|
version: 1.6.2
|
||||||
|
type: npm
|
||||||
|
summary: Efficient path tracking and pattern matching for XML/JSON parsers
|
||||||
|
homepage: https://github.com/NaturalIntelligence/path-expression-matcher#readme
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2024
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+26
@@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
name: semver
|
||||||
|
version: 7.8.5
|
||||||
|
type: npm
|
||||||
|
summary: The semantic version parser used by npm.
|
||||||
|
homepage:
|
||||||
|
license: isc
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
The ISC License
|
||||||
|
|
||||||
|
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
purpose with or without fee is hereby granted, provided that the above
|
||||||
|
copyright notice and this permission notice appear in all copies.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||||
|
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+32
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: strnum
|
||||||
|
version: 2.4.1
|
||||||
|
type: npm
|
||||||
|
summary: Parse String to Number based on configuration
|
||||||
|
homepage:
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2021 Natural Intelligence
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+23
@@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
name: tslib
|
||||||
|
version: 2.8.1
|
||||||
|
type: npm
|
||||||
|
summary: Runtime library for TypeScript helper functions
|
||||||
|
homepage: https://www.typescriptlang.org/
|
||||||
|
license: 0bsd
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE.txt
|
||||||
|
text: |-
|
||||||
|
Copyright (c) Microsoft Corporation.
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
purpose with or without fee is hereby granted.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||||
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||||
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||||
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||||
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||||
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
notices: []
|
||||||
Generated
+35
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
name: tunnel
|
||||||
|
version: 0.0.6
|
||||||
|
type: npm
|
||||||
|
summary: Node HTTP/HTTPS Agents for tunneling proxies
|
||||||
|
homepage: https://github.com/koichik/node-tunnel/
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2012 Koichi Kobayashi
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
- sources: README.md
|
||||||
|
text: Licensed under the [MIT](https://github.com/koichik/node-tunnel/blob/master/LICENSE)
|
||||||
|
license.
|
||||||
|
notices: []
|
||||||
Generated
+34
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
name: undici
|
||||||
|
version: 6.28.0
|
||||||
|
type: npm
|
||||||
|
summary: An HTTP/1.1 client, written from scratch for Node.js
|
||||||
|
homepage: https://undici.nodejs.org
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) Matteo Collina and Undici contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
- sources: README.md
|
||||||
|
text: MIT
|
||||||
|
notices: []
|
||||||
Generated
+35
@@ -0,0 +1,35 @@
|
|||||||
|
---
|
||||||
|
name: xml-naming
|
||||||
|
version: 0.3.0
|
||||||
|
type: npm
|
||||||
|
summary: Validates XML name productions — Name, NCName, QName, NMToken, NMTokens —
|
||||||
|
for XML 1.0 and 1.1
|
||||||
|
homepage:
|
||||||
|
license: mit
|
||||||
|
licenses:
|
||||||
|
- sources: LICENSE
|
||||||
|
text: |
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 Natural Intelligence
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
- sources: README.md
|
||||||
|
text: MIT
|
||||||
|
notices: []
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# Ignore list
|
||||||
|
/*
|
||||||
|
|
||||||
|
# Do not ignore these folders:
|
||||||
|
!__tests__/
|
||||||
|
!.github/
|
||||||
|
!src/
|
||||||
+2
-3
@@ -6,6 +6,5 @@
|
|||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"trailingComma": "none",
|
"trailingComma": "none",
|
||||||
"bracketSpacing": false,
|
"bracketSpacing": false,
|
||||||
"arrowParens": "avoid",
|
"arrowParens": "avoid"
|
||||||
"parser": "typescript"
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -0,0 +1,76 @@
|
|||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as
|
||||||
|
contributors and maintainers pledge to make participation in our project and
|
||||||
|
our community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||||
|
level of experience, education, socio-economic status, nationality, personal
|
||||||
|
appearance, race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment
|
||||||
|
include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||||
|
advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or electronic
|
||||||
|
address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable
|
||||||
|
behavior and are expected to take appropriate and fair corrective action in
|
||||||
|
response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or
|
||||||
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||||
|
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||||
|
permanently any contributor for other behaviors that they deem inappropriate,
|
||||||
|
threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies within all project spaces, and it also applies when
|
||||||
|
an individual is representing the project or its community in public spaces.
|
||||||
|
Examples of representing a project or community include using an official
|
||||||
|
project e-mail address, posting via an official social media account, or acting
|
||||||
|
as an appointed representative at an online or offline event. Representation of
|
||||||
|
a project may be further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported by contacting the project team at opensource+actions/setup-java@github.com. All
|
||||||
|
complaints will be reviewed and investigated and will result in a response that
|
||||||
|
is deemed necessary and appropriate to the circumstances. The project team is
|
||||||
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||||
|
Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||||
|
faith may face temporary or permanent repercussions as determined by other
|
||||||
|
members of the project's leadership.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||||
|
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see
|
||||||
|
https://www.contributor-covenant.org/faq
|
||||||
@@ -1,234 +1,519 @@
|
|||||||
# setup-java
|
# Setup Java
|
||||||
|
|
||||||
<p align="left">
|
[](https://github.com/actions/setup-java/actions/workflows/basic-validation.yml)
|
||||||
<a href="https://github.com/actions/setup-java"><img alt="GitHub Actions status" src="https://github.com/actions/setup-java/workflows/Main%20workflow/badge.svg"></a>
|
[](https://github.com/actions/setup-java/actions/workflows/e2e-versions.yml)
|
||||||
</p>
|
[](https://github.com/actions/setup-java/actions/workflows/e2e-cache.yml)
|
||||||
|
|
||||||
This action sets up a java environment for use in actions by:
|
Set up Java for GitHub Actions workflows. `setup-java` installs a requested Java distribution, adds it to `PATH`, configures `JAVA_HOME`, and can optionally cache build dependencies for Apache Maven, Gradle, and sbt; generate Maven publishing configuration, verify JDK package signatures, manage multiple JDKs, and manage Maven toolchains.
|
||||||
|
|
||||||
- optionally downloading and caching a requested version of java by version and adding to PATH. Default downloads are populated from the [Zulu Community distribution of OpenJDK](http://static.azul.com/zulu/bin/)
|
|
||||||
- registering problem matchers for error output
|
|
||||||
|
|
||||||
# Usage
|
|
||||||
|
|
||||||
See [action.yml](action.yml)
|
|
||||||
|
|
||||||
## Basic
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-java@v1
|
- uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
java-version: '9.0.4' # The JDK version to make available on the path.
|
distribution: temurin
|
||||||
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
|
java-version: '25'
|
||||||
architecture: x64 # (x64 or x86) - defaults to x64
|
- run: java --version
|
||||||
- run: java -cp java HelloWorldApp
|
|
||||||
```
|
```
|
||||||
Examples of version specifications that the java-version parameter will accept:
|
|
||||||
|
|
||||||
- A major Java version
|
> [!NOTE]
|
||||||
|
> V6 is still in development on the `main` branch and is not yet recommended for production workflows. To use it, you must explicitly reference the `main` branch in your workflow, as in
|
||||||
|
>
|
||||||
|
> ```yaml
|
||||||
|
> - uses: actions/setup-java@main
|
||||||
|
> ```
|
||||||
|
>
|
||||||
|
> For production workflows, it is recommended to use the latest stable release `v5`.
|
||||||
|
|
||||||
e.g. ```6, 7, 8, 9, 10, 11, 12, 13, ...```
|
## Contents
|
||||||
|
|
||||||
- A semver Java version specification
|
- [What it does](#what-it-does)
|
||||||
|
- [What's new](#whats-new)
|
||||||
|
- [Usage](#usage)
|
||||||
|
- [Inputs](#inputs)
|
||||||
|
- [Supported distributions](#supported-distributions)
|
||||||
|
- [Supported version syntax](#supported-version-syntax)
|
||||||
|
- [Caching](#caching)
|
||||||
|
- [Multiple JDKs and Maven toolchains](#multiple-jdks-and-maven-toolchains)
|
||||||
|
- [Publishing packages](#publishing-packages)
|
||||||
|
- [Advanced usage](#advanced-usage)
|
||||||
|
|
||||||
e.g. ```8.0.232, 7.0.181, 11.0.4```
|
## What it does
|
||||||
|
|
||||||
e.g. ```8.0.x, >11.0.3, >=13.0.1, <8.0.212```
|
- Downloads and installs Java from a supported distribution.
|
||||||
|
- Uses a requested Java version, a version file, or the `latest` stable release alias.
|
||||||
|
- Extracts and caches a custom JDK archive from a local file.
|
||||||
|
- Configures Maven `settings.xml`, Maven Toolchains, Maven GPG signing inputs, and environment-variable based credentials for publishing workflows.
|
||||||
|
- Registers Java problem matchers for compiler diagnostics and uncaught exceptions.
|
||||||
|
- Caches dependencies for Maven, Gradle, and sbt.
|
||||||
|
- Caches downloaded JDK installations between jobs.
|
||||||
|
- Verifies downloaded archive checksums when a distribution publishes authoritative checksums.
|
||||||
|
- Optionally verifies package signatures for supported distributions.
|
||||||
|
|
||||||
- An early access (EA) Java version
|
`setup-java` works with Java, Scala, Kotlin, Gradle, Maven, and sbt projects.
|
||||||
|
|
||||||
e.g. ```14-ea, 15-ea```
|
## What's new
|
||||||
|
|
||||||
e.g. ```14.0.0-ea, 15.0.0-ea```
|
### V6 (in development)
|
||||||
|
|
||||||
e.g. ```14.0.0-ea.28, 15.0.0-ea.2``` (syntax for specifying an EA build number)
|
- Migrated the action implementation to ESM to support the latest `@actions/*` packages.
|
||||||
|
- Added the `oracle-openjdk` distribution for OpenJDK builds from Oracle.
|
||||||
|
- Added `java-version: latest` to resolve the newest stable GA release from the distribution's remote metadata.
|
||||||
|
- JDK downloads now automatically verify authoritative checksums for [supported distributions](#download-integrity-and-signatures).
|
||||||
|
- Added `force-download: true` to bypass the tool cache and perform a reproducible fresh install.
|
||||||
|
- Dependency caching now supports custom paths with `cache-path` and restore-only operation with `cache-read-only: true`.
|
||||||
|
- Downloaded JDKs are now [cached](#caching-jdk-installations) automatically when `cache` is set; use `cache-jdk` to enable or disable it independently.
|
||||||
|
- Set `problem-matcher: false` to disable Java compiler and uncaught-exception annotations.
|
||||||
|
- GraalVM distributions now set `GRAALVM_HOME` in addition to `JAVA_HOME`.
|
||||||
|
- Invalid boolean values, unsupported distribution/package/platform combinations, and mismatched Maven toolchain ID counts now fail with targeted errors.
|
||||||
|
- Renamed environment-variable-name inputs so they are not mistaken for secret values:
|
||||||
|
- `server-username` -> `server-username-env-var`
|
||||||
|
- `server-password` -> `server-password-env-var`
|
||||||
|
- `gpg-passphrase` -> `gpg-passphrase-env-var`
|
||||||
|
- Deprecated aliases still work, but emit warnings.
|
||||||
|
- Maven GPG passphrases are now passed through `gpg.passphraseEnvName` instead of a deprecated `gpg.passphrase` server entry in `settings.xml`. This requires `maven-gpg-plugin` 3.2.0 or newer. See [GPG](docs/advanced-usage.md#gpg).
|
||||||
|
- Legacy AdoptOpenJDK distributions were removed. Use `temurin` instead of `adopt` or `adopt-hotspot`, and `semeru` instead of `adopt-openj9`.
|
||||||
|
|
||||||
Note that, per semver rules, EA builds will be matched by explicit EA version specifications.
|
### V5
|
||||||
|
|
||||||
- 1.x syntax
|
- Upgraded the action runtime from Node 20 to Node 24. Self-hosted runners must use version `v2.327.1` or later. See the [runner release notes](https://github.com/actions/runner/releases/tag/v2.327.1).
|
||||||
|
- Added support for [GraalVM Community](#supported-distributions) and [Tencent Kona](#supported-distributions).
|
||||||
|
- Expanded `java-version-file` support with `.sdkmanrc` files and automatic distribution detection from SDKMAN and asdf vendor identifiers.
|
||||||
|
- Added optional package-signature verification for Eclipse Temurin and Microsoft Build of OpenJDK downloads.
|
||||||
|
- Added `set-default: false` for installing a JDK without changing `JAVA_HOME` or `PATH`.
|
||||||
|
- Improved dependency caching with separate Maven and Gradle wrapper caches, Maven extension-aware cache keys, and the `cache-primary-key` output.
|
||||||
|
- Improved Maven and Java build behavior by preserving toolchain entries across repeated action invocations, suppressing transfer progress by default, generating non-interactive Maven settings, and matching `javac` compiler errors.
|
||||||
|
- Renamed the `jdkFile` input to `jdk-file`; the old name remains available as a deprecated alias.
|
||||||
|
- See the [complete V5 release history](https://github.com/actions/setup-java/releases?q=v5&expanded=true) for enhancements and fixes across all V5 releases.
|
||||||
|
|
||||||
e.g. ```1.8``` (same as ```8```)
|
### Older versions
|
||||||
|
|
||||||
e.g. ```1.8.0.212``` (same as ```8.0.212```)
|
> [!WARNING]
|
||||||
|
> `actions/setup-java` versions `v1` through `v4` are deprecated. Upgrade workflows to `actions/setup-java@v5`, the latest stable release.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Install Eclipse Temurin
|
||||||
|
|
||||||
## Local file
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-java@v1
|
- uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
java-version: '4.0.0'
|
distribution: temurin
|
||||||
architecture: x64
|
java-version: '25'
|
||||||
jdkFile: <path to jdkFile> # Optional - jdkFile to install java from. Useful for versions not found on Zulu Community CDN
|
- run: java --version
|
||||||
- run: java -cp java HelloWorldApp
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Matrix Testing
|
### Install Microsoft Build of OpenJDK
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
- uses: actions/setup-java@v5
|
||||||
|
with:
|
||||||
|
distribution: microsoft
|
||||||
|
java-version: '25'
|
||||||
|
- run: java --version
|
||||||
|
```
|
||||||
|
|
||||||
|
### Read the version from a file
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
- uses: actions/setup-java@v5
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version-file: .java-version
|
||||||
|
- run: java --version
|
||||||
|
```
|
||||||
|
|
||||||
|
Supported version files are `.java-version`, `.tool-versions`, and `.sdkmanrc`. A `.sdkmanrc` file can also provide the distribution when it contains a recognized suffix, such as `java=21.0.5-tem`.
|
||||||
|
|
||||||
|
### Use the newest stable Java
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
- uses: actions/setup-java@v5
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: latest
|
||||||
|
- run: java --version
|
||||||
|
```
|
||||||
|
|
||||||
|
`latest` resolves the newest stable GA release from remote metadata rather than from the runner tool cache. Distributions that do not publish a release listing (such as `oracle` and `graalvm`) resolve the newest GA feature version from the Adoptium available-releases API and then request that version from their own catalog. `latest` is not supported with `java-version-file`, early-access versions, or `distribution: jdkfile`.
|
||||||
|
|
||||||
|
## Inputs
|
||||||
|
|
||||||
|
| Input | Description | Default |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `java-version` | Java version to install. Supports whole versions, semver ranges, early-access versions, and `latest`. Required unless `java-version-file` is set. | |
|
||||||
|
| `java-version-file` | Path to `.java-version`, `.tool-versions`, or `.sdkmanrc`. Used when `java-version` is not set. | |
|
||||||
|
| `distribution` | Java distribution keyword. Values are case-sensitive and must match one of the supported keywords below. Required unless `java-version-file` points to `.sdkmanrc` with a recognized distribution suffix. | |
|
||||||
|
| `java-package` | Package variant such as `jdk`, `jre`, `jdk+fx`, `jre+fx`, `jdk+crac`, `jre+crac`, `jdk+jmods`, `jdk+jcef`, `jre+jcef`, `jdk+ft`, or `jre+ft`. Support varies by distribution. | `jdk` |
|
||||||
|
| `architecture` | Package architecture. Canonical values are `x86`, `x64`, `armv7`, `aarch64`, `ppc64le`, `ppc64`, and `s390x`. Aliases `ia32`, `amd64`, `arm`, and `arm64` are normalized. | Runner architecture |
|
||||||
|
| `jdk-file` | Local compressed JDK archive. Requires `distribution: jdkfile`. | |
|
||||||
|
| `check-latest` | Check remote metadata for the latest version satisfying the version spec before using the runner tool cache. | `false` |
|
||||||
|
| `force-download` | Always download Java and replace any matching version in the tool cache. | `false` |
|
||||||
|
| `set-default` | Add Java to `PATH` and set `JAVA_HOME`. When `false`, only version-specific `JAVA_HOME_<major>_<arch>` variables are set. | `true` |
|
||||||
|
| `problem-matcher` | Register Java compiler and uncaught exception problem matchers. | `true` |
|
||||||
|
| `verify-signature` | Verify downloaded Java package signatures when supported. Currently supported for `temurin` and `microsoft`. | `false` |
|
||||||
|
| `verify-signature-public-key` | ASCII-armored GPG public key to use for signature verification. Overrides the bundled key. | |
|
||||||
|
| `token` | Token for fetching GitHub.com-hosted version manifests, useful on GitHub Enterprise Server when unauthenticated requests are rate-limited. | `${{ github.token }}` on GitHub.com; empty string on GHES |
|
||||||
|
| `cache` | Enable dependency caching for `maven`, `gradle`, or `sbt`. | |
|
||||||
|
| `cache-jdk` | Cache downloaded JDK installations between jobs. When omitted, JDK caching is enabled only if `cache` is set. Set explicitly to `true` or `false` to override. | Enabled when `cache` is set |
|
||||||
|
| `cache-dependency-path` | Dependency file paths used for cache key hashing. Supports globs and multiline values. | Auto-detected by package manager |
|
||||||
|
| `cache-path` | Cache paths to use instead of the package manager's default dependency cache path. Supports multiline values and exclusions. | |
|
||||||
|
| `cache-read-only` | Restore dependency, wrapper, and JDK caches without saving changes in the post step. | `false` |
|
||||||
|
| `server-id` | Maven repository ID used in generated `settings.xml`. | `github` |
|
||||||
|
| `server-username-env-var` | Environment variable name for Maven repository username. | `GITHUB_ACTOR` |
|
||||||
|
| `server-password-env-var` | Environment variable name for Maven repository password or token. | `GITHUB_TOKEN` |
|
||||||
|
| `settings-path` | Directory where `settings.xml` is written. | `~/.m2` |
|
||||||
|
| `overwrite-settings` | Overwrite an existing `settings.xml`. | `true` |
|
||||||
|
| `gpg-private-key` | GPG private key to import. | |
|
||||||
|
| `gpg-passphrase-env-var` | Environment variable name for the GPG private key passphrase. | `GPG_PASSPHRASE` when a key is set |
|
||||||
|
| `mvn-toolchain-id` | Maven Toolchain ID. When multiple Java versions are installed, the number of IDs must match the number of versions. | `${mvn-toolchain-vendor}_${java-version}` |
|
||||||
|
| `mvn-toolchain-vendor` | Maven Toolchain vendor value. | `${distribution}` |
|
||||||
|
| `show-download-progress` | Keep Maven artifact download and transfer progress in logs. When `false`, the action adds `-ntp` to `MAVEN_ARGS`. | `false` |
|
||||||
|
|
||||||
|
- `java-package`: Supported package types are `jdk`, `jre`, `jdk+fx`, `jre+fx`, `jdk+crac`, `jre+crac`, `jdk+jmods`, `jdk+jcef`, `jre+jcef`, `jdk+ft`, and `jre+ft`. Availability varies by distribution.
|
||||||
|
|
||||||
|
Deprecated aliases `jdkFile`, `server-username`, `server-password`, and `gpg-passphrase` remain accepted for compatibility, but should be replaced with the current input names.
|
||||||
|
|
||||||
|
## Outputs
|
||||||
|
|
||||||
|
| Output | Description |
|
||||||
|
| --- | --- |
|
||||||
|
| `distribution` | Distribution that was installed. |
|
||||||
|
| `version` | Actual Java version that was installed. |
|
||||||
|
| `path` | Installation path, also used for `JAVA_HOME` when `set-default` is enabled. |
|
||||||
|
| `cache-hit` | Whether an exact dependency cache match was restored. |
|
||||||
|
| `cache-primary-key` | Primary cache key computed for the selected package manager. Empty when caching is disabled or skipped. |
|
||||||
|
|
||||||
|
## Supported distributions
|
||||||
|
|
||||||
|
| Keyword | Distribution | License |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `corretto` | [Amazon Corretto](https://aws.amazon.com/corretto/) | [License](https://aws.amazon.com/corretto/faqs/) |
|
||||||
|
| `dragonwell` | [Alibaba Dragonwell JDK](https://dragonwell-jdk.io/) | [License](https://www.aliyun.com/product/dragonwell/) |
|
||||||
|
| `graalvm` | [Oracle GraalVM](https://www.graalvm.org/) | [License](https://www.oracle.com/downloads/licenses/graal-free-license.html) |
|
||||||
|
| `graalvm-community` | [GraalVM Community](https://github.com/graalvm/graalvm-ce-builds/releases) | [License](https://github.com/oracle/graal/blob/master/LICENSE) |
|
||||||
|
| `jetbrains` | [JetBrains Runtime](https://github.com/JetBrains/JetBrainsRuntime/) | [License](https://github.com/JetBrains/JetBrainsRuntime/blob/main/LICENSE) |
|
||||||
|
| `kona` | [Tencent Kona JDK](https://tencent.github.io/konajdk/) | [License](https://tencent.github.io/konajdk/LICENSE.txt) |
|
||||||
|
| `liberica` | [Liberica JDK](https://bell-sw.com/) | [License](https://bell-sw.com/liberica_eula/) |
|
||||||
|
| `liberica-nik` | [Liberica Native Image Kit](https://bell-sw.com/pages/downloads/native-image-kit/) | [License](https://bell-sw.com/liberica_nik_eula/) |
|
||||||
|
| `microsoft` | [Microsoft Build of OpenJDK](https://www.microsoft.com/openjdk) | [License](https://docs.microsoft.com/java/openjdk/faq) |
|
||||||
|
| `oracle` | [Oracle JDK](https://www.oracle.com/java/technologies/downloads/) | [License](https://java.com/freeuselicense) |
|
||||||
|
| `oracle-openjdk` | [Oracle OpenJDK](https://jdk.java.net/) | [License](https://openjdk.org/legal/gplv2+ce.html) |
|
||||||
|
| `sapmachine` | [SAP SapMachine JDK/JRE](https://sapmachine.io/) | [License](https://github.com/SAP/SapMachine/blob/sapmachine/LICENSE) |
|
||||||
|
| `semeru` | [IBM Semeru Runtime Open Edition](https://developer.ibm.com/languages/java/semeru-runtimes/downloads/) | [License](https://openjdk.java.net/legal/gplv2+ce.html) |
|
||||||
|
| `temurin` | [Eclipse Temurin](https://adoptium.net/) | [License](https://adoptium.net/about.html) |
|
||||||
|
| `zulu` | [Azul Zulu OpenJDK](https://www.azul.com/downloads/zulu-community/?package=jdk) | [License](https://www.azul.com/products/zulu-and-zulu-enterprise/zulu-terms-of-use/) |
|
||||||
|
| `jdkfile` | Custom JDK archive | |
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> Distribution availability, package variants, architectures, and version metadata differ by vendor. Check the vendor documentation when a specific version or platform matters.
|
||||||
|
|
||||||
|
Additional distribution notes:
|
||||||
|
|
||||||
|
- Oracle OpenJDK builds are archived after a limited number of releases and no longer receive security updates. To continue receiving security patches, use Oracle JDK or another vendor.
|
||||||
|
- Azul Zulu maps `arm64` to `aarch64` when querying the Azul Metadata API.
|
||||||
|
- GraalVM Community is available as `distribution: graalvm-community` for stable JDK 17 and later releases.
|
||||||
|
- On Ubuntu runners, commands executed with `sudo` do not inherit the `JAVA_HOME` and `PATH` set by `setup-java` and may fall back to the system-default JDK.
|
||||||
|
|
||||||
|
## Supported version syntax
|
||||||
|
|
||||||
|
`java-version` accepts exact versions, version ranges, early-access versions, and `latest`.
|
||||||
|
|
||||||
|
| Syntax | Examples |
|
||||||
|
| --- | --- |
|
||||||
|
| Major version | `8`, `11`, `17`, `21`, `25` |
|
||||||
|
| Specific feature or patch version | `11.0`, `11.0.4`, `17.0`, `8.0.282+8` |
|
||||||
|
| JEP 322 multi-field versions | `11.0.9.1`, `18.0.1.1` |
|
||||||
|
| Early access | `15-ea`, `15.0.0-ea`, `27-ea` |
|
||||||
|
| Latest stable GA release | `latest` |
|
||||||
|
|
||||||
|
When `check-latest` is `false`, the action first tries the runner tool cache for the requested distribution, package type, architecture, and version range. It downloads Java only when no matching cached version is found. When `check-latest` is `true`, the action checks remote metadata first and downloads if the cached version is not current.
|
||||||
|
|
||||||
|
GitHub-hosted runners primarily pre-cache Eclipse Temurin JDKs. See the installed Java versions for [Ubuntu](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#java), [Windows](https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md#java), and [macOS](https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md#java). On a fresh GitHub-hosted runner, requests for other distributions usually miss the tool cache and resolve from remote metadata. For broad version ranges such as a major version (`21`, `25`), this often behaves similarly to `check-latest: true` because the action downloads the latest available release that satisfies the range.
|
||||||
|
|
||||||
|
## Download integrity and signatures
|
||||||
|
|
||||||
|
`setup-java` automatically verifies downloaded archive checksums when a selected distribution publishes an authoritative checksum. Automatic checksum verification currently applies to `temurin`, `semeru`, `corretto`, `dragonwell`, `kona`, `sapmachine`, `graalvm`, `graalvm-community`, `zulu`, `oracle`, `oracle-openjdk`, `microsoft`, and `jetbrains`.
|
||||||
|
|
||||||
|
Distributions or individual releases without an authoritative checksum continue to install normally, with the omission reported in debug logs. Installations resolved directly from the runner tool cache — including JDKs preinstalled on the runner image and JDKs installed by an earlier step of the same job — are not downloaded again and are not reverified, even when `verify-signature: true` is set. Use `force-download: true` to always download and verify the archive.
|
||||||
|
|
||||||
|
Use `verify-signature: true` to verify package signatures for distributions that support it. Currently supported distributions are `temurin` and `microsoft`; setting it for an unsupported distribution fails the workflow.
|
||||||
|
|
||||||
|
## Caching
|
||||||
|
|
||||||
|
`setup-java` manages three kinds of caches. Each one is restored and saved as a separate cache entry.
|
||||||
|
|
||||||
|
| Cache | What it stores | Key based on | How it is enabled |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| Dependency cache | Downloaded dependencies, such as `~/.m2/repository`, `~/.gradle/caches`, or the sbt cache paths | Runner OS, architecture, package manager, and a hash of the dependency files | Set `cache` to `maven`, `gradle`, or `sbt` |
|
||||||
|
| Wrapper caches | Maven and Gradle wrapper distributions (`~/.m2/wrapper/dists`, `~/.gradle/wrapper`) | Runner OS, architecture, wrapper cache name, and a hash of the wrapper properties | Set `cache` to `maven` or `gradle` |
|
||||||
|
| JDK cache | The downloaded JDK installation | Runner OS, architecture, distribution, package type, resolved version, release identity, and signature-verification identity | Enabled implicitly whenever `cache` is set, or explicitly with `cache-jdk: true`. Opt out with `cache-jdk: false` |
|
||||||
|
|
||||||
|
Set `cache` to `maven`, `gradle`, or `sbt` to cache dependencies with minimal configuration.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
- uses: actions/setup-java@v5
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '25'
|
||||||
|
cache: maven
|
||||||
|
- run: mvn verify
|
||||||
|
```
|
||||||
|
|
||||||
|
The primary dependency cache key is `setup-java-<runner-os>-<node-arch>-<package-manager>-<file-hash>`, where `<node-arch>` is the runner's Node.js process architecture. The primary cache stores dependency directories such as `~/.m2/repository`, `~/.gradle/caches`, or the sbt cache paths. Its file hash is based on these files by default:
|
||||||
|
|
||||||
|
| Package manager | Files used for the primary dependency-cache key |
|
||||||
|
| --- | --- |
|
||||||
|
| Gradle | `**/*.gradle*`, `**/gradle-wrapper.properties`, `buildSrc/**/Versions.kt`, `buildSrc/**/Dependencies.kt`, `gradle/*.versions.toml`, `**/versions.properties` |
|
||||||
|
| Maven | `**/pom.xml`, `**/.mvn/wrapper/maven-wrapper.properties`, `**/.mvn/extensions.xml` |
|
||||||
|
| sbt | `**/*.sbt`, `**/project/build.properties`, `**/project/**.scala`, `**/project/**.sbt` |
|
||||||
|
|
||||||
|
Use `cache-dependency-path` to override the files used for key hashing, especially in monorepos:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: actions/setup-java@v5
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '25'
|
||||||
|
cache: gradle
|
||||||
|
cache-dependency-path: |
|
||||||
|
sub-project/*.gradle*
|
||||||
|
sub-project/**/gradle-wrapper.properties
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `cache-path` when the build tool stores dependencies outside the default location:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: actions/setup-java@v5
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '25'
|
||||||
|
cache: maven
|
||||||
|
cache-path: |
|
||||||
|
/custom/maven/repository
|
||||||
|
!/custom/maven/repository/**/*.lastUpdated
|
||||||
|
- run: mvn -Dmaven.repo.local=/custom/maven/repository verify
|
||||||
|
```
|
||||||
|
|
||||||
|
`cache-path` changes what is restored and saved, but not the cache key. Jobs that should share a cache key must use the same OS, architecture, package manager, dependency files, and cache paths.
|
||||||
|
|
||||||
|
### Wrapper caches
|
||||||
|
|
||||||
|
Maven and Gradle wrapper distributions are restored and saved as additional cache entries, separate from the primary dependency cache. These entries have their own keys in the form `setup-java-<runner-os>-<node-arch>-<wrapper-cache-name>-<file-hash>`.
|
||||||
|
|
||||||
|
| Package manager | Wrapper cache name | Cached path | Files used for wrapper-cache key |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| Maven | `maven-wrapper` | `~/.m2/wrapper/dists` | `**/.mvn/wrapper/maven-wrapper.properties` |
|
||||||
|
| Gradle | `gradle-wrapper` | `~/.gradle/wrapper` | `**/gradle-wrapper.properties` |
|
||||||
|
|
||||||
|
These wrapper caches are independent from dependency caches, so they remain useful even when dependency files change frequently. The wrapper properties are also part of the Maven and Gradle primary dependency-cache key because wrapper changes can affect how dependencies are resolved, but the wrapper distribution files themselves are stored in the separate wrapper cache entries above.
|
||||||
|
|
||||||
|
For advanced Gradle caching features such as build output caching, configuration cache support, encrypted cache storage, cleanup, and fine-grained cache control, consider [`gradle/actions/setup-gradle`](https://github.com/gradle/actions/tree/main/setup-gradle).
|
||||||
|
|
||||||
|
### Caching JDK installations
|
||||||
|
|
||||||
|
The JDK cache stores the downloaded JDK installation so later runs skip the download. It is enabled implicitly whenever dependency `cache` is set, so most workflows that cache dependencies are already caching the JDK. Set `cache-jdk: true` to enable it without dependency caching, or `cache-jdk: false` to opt out while keeping dependency caching. With neither `cache` nor `cache-jdk` set, nothing is cached.
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> Because JDK caching is on by default whenever `cache` is set, review [Caching JDK installations](docs/advanced-usage.md#caching-jdk-installations)
|
||||||
|
> for the full `cache`/`cache-jdk` matrix, cache identity and storage impact.
|
||||||
|
|
||||||
|
### Read-only caches
|
||||||
|
|
||||||
|
Set `cache-read-only: true` to restore dependency, wrapper, and JDK caches without saving changes in the post action. This is useful for pull requests, merge queues, short-lived branches, and matrix fan-out jobs that should only consume caches produced elsewhere.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: actions/setup-java@v5
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '25'
|
||||||
|
cache: maven
|
||||||
|
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
|
||||||
|
```
|
||||||
|
|
||||||
|
For matrix fan-out, seed the cache once and make matrix jobs read-only consumers:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
jobs:
|
jobs:
|
||||||
|
seed-cache:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
- uses: actions/setup-java@v5
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '25'
|
||||||
|
cache: maven
|
||||||
|
- run: mvn dependency:go-offline dependency:resolve-plugins
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-16.04
|
needs: seed-cache
|
||||||
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# test against latest update of each major Java version, as well as specific updates of LTS versions:
|
goal: [test, verify, package]
|
||||||
java: [ 1.6, 6.0.83, 7, 7.0.181, 8, 8.0.192, 9.0.x, 10, 11.0.x, 11.0.3, 12, 13 ]
|
|
||||||
name: Java ${{ matrix.java }} sample
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v7
|
||||||
- name: Setup java
|
- uses: actions/setup-java@v5
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '25'
|
||||||
|
cache: maven
|
||||||
|
cache-read-only: true
|
||||||
|
- run: mvn ${{ matrix.goal }}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Cache segment restore timeout
|
||||||
|
|
||||||
|
Cache downloads are split into segments. To reduce the chance of a stuck segment blocking a workflow, set `SEGMENT_DOWNLOAD_TIMEOUT_MINS`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
env:
|
||||||
|
SEGMENT_DOWNLOAD_TIMEOUT_MINS: '5'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
- uses: actions/setup-java@v5
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '25'
|
||||||
|
cache: gradle
|
||||||
|
- run: ./gradlew build --no-daemon
|
||||||
|
```
|
||||||
|
|
||||||
|
## Multiple JDKs and Maven toolchains
|
||||||
|
|
||||||
|
Install multiple Java versions by providing a multiline `java-version` value. All configured JDKs are installed. The last one added to `PATH` becomes the default.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: actions/setup-java@v5
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: |
|
||||||
|
8
|
||||||
|
11
|
||||||
|
17
|
||||||
|
21
|
||||||
|
25
|
||||||
|
```
|
||||||
|
|
||||||
|
Other installed JDKs are available through version-specific variables such as `JAVA_HOME_17_X64`. To use a specific version later in the job, set `JAVA_HOME` and prepend its `bin` directory to `PATH`.
|
||||||
|
|
||||||
|
`setup-java` writes a Maven Toolchains declaration for each installed JDK. When multiple JDKs are installed, the declaration contains all of them. Customize the generated toolchain values with `mvn-toolchain-id` and `mvn-toolchain-vendor`.
|
||||||
|
|
||||||
|
## Testing with a Java matrix
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
java: ['8', '11', '17', '21', '25']
|
||||||
|
name: Java ${{ matrix.java }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v7
|
||||||
|
- uses: actions/setup-java@v5
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
java-version: ${{ matrix.java }}
|
java-version: ${{ matrix.java }}
|
||||||
- run: java -cp java HelloWorldApp
|
- run: java --version
|
||||||
|
- run: mvn verify
|
||||||
```
|
```
|
||||||
|
|
||||||
## Publishing using Apache Maven
|
## Publishing packages
|
||||||
|
|
||||||
|
`setup-java` generates Maven `settings.xml` and Maven Toolchains configuration. For Gradle publishing, it installs Java for the workflow; the Gradle build file remains responsible for reading credentials from environment variables.
|
||||||
|
|
||||||
|
### Maven
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
jobs:
|
steps:
|
||||||
build:
|
- uses: actions/checkout@v7
|
||||||
|
- uses: actions/setup-java@v5
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up JDK 1.8
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
with:
|
||||||
java-version: 1.8
|
distribution: temurin
|
||||||
|
java-version: '25'
|
||||||
- name: Build with Maven
|
server-id: github
|
||||||
run: mvn -B package --file pom.xml
|
server-username-env-var: GITHUB_ACTOR
|
||||||
|
server-password-env-var: GITHUB_TOKEN
|
||||||
- name: Publish to GitHub Packages Apache Maven
|
- run: mvn --batch-mode deploy
|
||||||
run: mvn deploy
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }} # GITHUB_TOKEN is the default env for the password
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Set up Apache Maven Central
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with: # running setup-java again overwrites the settings.xml
|
|
||||||
java-version: 1.8
|
|
||||||
server-id: maven # Value of the distributionManagement/repository/id field of the pom.xml
|
|
||||||
server-username: MAVEN_USERNAME # env variable for username in deploy
|
|
||||||
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
|
|
||||||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
|
|
||||||
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
|
|
||||||
|
|
||||||
- name: Publish to Apache Maven Central
|
|
||||||
run: mvn deploy
|
|
||||||
env:
|
|
||||||
MAVEN_USERNAME: maven_username123
|
|
||||||
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
|
|
||||||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The two `settings.xml` files created from the above example look like the following.
|
### GPG signing
|
||||||
|
|
||||||
`settings.xml` file created for the first deploy to GitHub Packages
|
|
||||||
```xml
|
|
||||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
|
|
||||||
<servers>
|
|
||||||
<server>
|
|
||||||
<id>github</id>
|
|
||||||
<username>${env.GITHUB_ACTOR}</username>
|
|
||||||
<password>${env.GITHUB_TOKEN}</password>
|
|
||||||
</server>
|
|
||||||
<server>
|
|
||||||
<id>gpg.passphrase</id>
|
|
||||||
<passphrase>${env.GPG_PASSPHRASE}</passphrase>
|
|
||||||
</server>
|
|
||||||
</servers>
|
|
||||||
</settings>
|
|
||||||
```
|
|
||||||
|
|
||||||
`settings.xml` file created for the second deploy to Apache Maven Central
|
|
||||||
```xml
|
|
||||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
|
|
||||||
<servers>
|
|
||||||
<server>
|
|
||||||
<id>maven</id>
|
|
||||||
<username>${env.MAVEN_USERNAME}</username>
|
|
||||||
<password>${env.MAVEN_CENTRAL_TOKEN}</password>
|
|
||||||
</server>
|
|
||||||
<server>
|
|
||||||
<id>gpg.passphrase</id>
|
|
||||||
<passphrase>${env.MAVEN_GPG_PASSPHRASE}</passphrase>
|
|
||||||
</server>
|
|
||||||
</servers>
|
|
||||||
</settings>
|
|
||||||
```
|
|
||||||
|
|
||||||
***NOTE: The `settings.xml` file is created in the Actions $HOME directory. If you have an existing `settings.xml` file at that location, it will be overwritten. See below for using the `settings-path` to change your `settings.xml` file location.***
|
|
||||||
|
|
||||||
If `gpg-private-key` input is provided, the private key will be written to a file in the runner's temp directory, the private key file will be imported into the GPG keychain, and then the file will be promptly removed before proceeding with the rest of the setup process. A cleanup step will remove the imported private key from the GPG keychain after the job completes regardless of the job status. This ensures that the private key is no longer accessible on self-hosted runners and cannot "leak" between jobs (hosted runners are always clean instances).
|
|
||||||
|
|
||||||
See the help docs on [Publishing a Package](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-apache-maven-for-use-with-github-packages#publishing-a-package) for more information on the `pom.xml` file.
|
|
||||||
|
|
||||||
## Publishing using Gradle
|
|
||||||
```yaml
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up JDK 1.8
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: gradle build
|
|
||||||
|
|
||||||
- name: Publish to GitHub Packages
|
|
||||||
run: gradle publish
|
|
||||||
env:
|
|
||||||
USERNAME: ${{ github.actor }}
|
|
||||||
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
```
|
|
||||||
|
|
||||||
***NOTE: The `USERNAME` and `PASSWORD` need to correspond to the credentials environment variables used in the publishing section of your `build.gradle`.***
|
|
||||||
|
|
||||||
See the help docs on [Publishing a Package with Gradle](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-gradle-for-use-with-github-packages#example-using-gradle-groovy-for-a-single-package-in-a-repository) for more information on the `build.gradle` configuration file.
|
|
||||||
|
|
||||||
## Apache Maven with a settings path
|
|
||||||
|
|
||||||
When using an Actions self-hosted runner with multiple shared runners the default `$HOME` directory can be shared by a number runners at the same time which could overwrite existing settings file. Setting the `settings-path` variable allows you to choose a unique location for your settings file.
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
jobs:
|
steps:
|
||||||
build:
|
- uses: actions/checkout@v7
|
||||||
|
- uses: actions/setup-java@v5
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Set up JDK 1.8 for Shared Runner
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
with:
|
||||||
java-version: 1.8
|
distribution: temurin
|
||||||
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
java-version: '25'
|
||||||
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
|
gpg-passphrase-env-var: GPG_PASSPHRASE
|
||||||
- name: Build with Maven
|
- run: mvn --batch-mode deploy
|
||||||
run: mvn -B package --file pom.xml
|
|
||||||
|
|
||||||
- name: Publish to GitHub Packages Apache Maven
|
|
||||||
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
```
|
```
|
||||||
|
|
||||||
# License
|
Maven GPG signing requires `maven-gpg-plugin` 3.2.0 or newer because `setup-java` passes the passphrase through `gpg.passphraseEnvName`.
|
||||||
|
|
||||||
The scripts and documentation in this project are released under the [MIT License](LICENSE)
|
## Recommended permissions
|
||||||
|
|
||||||
# Contributions
|
When using the `setup-java` action in your GitHub Actions workflow, it is recommended to set the following permissions to ensure proper functionality:
|
||||||
|
|
||||||
Contributions are welcome! See [Contributor's Guide](docs/contributors.md)
|
```yaml
|
||||||
|
permissions:
|
||||||
|
contents: read # access to check out code and install dependencies
|
||||||
|
```
|
||||||
|
|
||||||
|
Publishing workflows may require additional permissions depending on the target registry.
|
||||||
|
|
||||||
|
## Advanced usage
|
||||||
|
|
||||||
|
See [advanced usage](docs/advanced-usage.md) for detailed examples:
|
||||||
|
|
||||||
|
- [Selecting a Java distribution](docs/advanced-usage.md#selecting-a-java-distribution)
|
||||||
|
- [Installing custom Java package types](docs/advanced-usage.md#installing-custom-java-package-type)
|
||||||
|
- [Package compatibility](docs/advanced-usage.md#package-compatibility)
|
||||||
|
- [Ensuring the Maven cache is complete](docs/advanced-usage.md#ensuring-the-maven-cache-is-complete-plugin-dependencies)
|
||||||
|
- [Caching JDK installations](docs/advanced-usage.md#caching-jdk-installations)
|
||||||
|
- [Platform and architecture compatibility](docs/advanced-usage.md#platform-and-architecture-compatibility)
|
||||||
|
- [Installing custom Java architecture](docs/advanced-usage.md#installing-custom-java-architecture)
|
||||||
|
- [Installing a JDK without setting it as default](docs/advanced-usage.md#installing-jdk-without-setting-as-default)
|
||||||
|
- [Installing Java from a local file](docs/advanced-usage.md#installing-java-from-local-file)
|
||||||
|
- [Testing against different Java distributions](docs/advanced-usage.md#testing-against-different-java-distributions)
|
||||||
|
- [Testing against different platforms](docs/advanced-usage.md#testing-against-different-platforms)
|
||||||
|
- [Publishing using Apache Maven](docs/advanced-usage.md#publishing-using-apache-maven)
|
||||||
|
- [Apache Maven with a settings path](docs/advanced-usage.md#apache-maven-with-a-settings-path)
|
||||||
|
- [Maven transfer progress](docs/advanced-usage.md#maven-transfer-progress-download-logs)
|
||||||
|
- [Java problem matcher](docs/advanced-usage.md#java-problem-matcher-compiler-annotations)
|
||||||
|
- [Publishing using Gradle](docs/advanced-usage.md#publishing-using-gradle)
|
||||||
|
- [Hosted tool cache](docs/advanced-usage.md#hosted-tool-cache)
|
||||||
|
- [Modifying Maven Toolchains](docs/advanced-usage.md#modifying-maven-toolchains)
|
||||||
|
- [Java version files](docs/advanced-usage.md#java-version-file)
|
||||||
|
- [Self-signed certificates and internal CAs on GitHub Enterprise](docs/advanced-usage.md#self-signed-certificates-and-internal-cas-github-enterprise)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
The scripts and documentation in this project are released under the [MIT License](LICENSE).
|
||||||
|
|
||||||
|
## Contributions
|
||||||
|
|
||||||
|
Contributions are welcome. See our [Contributor's Guide](docs/contributors.md).
|
||||||
|
|
||||||
|
## Code of Conduct
|
||||||
|
|
||||||
|
:wave: Be nice. See [our code of conduct](CODE_OF_CONDUCT.md)
|
||||||
|
|||||||
+232
-22
@@ -1,23 +1,65 @@
|
|||||||
import io = require('@actions/io');
|
import {
|
||||||
import fs = require('fs');
|
jest,
|
||||||
import os = require('os');
|
describe,
|
||||||
import path = require('path');
|
it,
|
||||||
|
expect,
|
||||||
|
beforeEach,
|
||||||
|
afterEach,
|
||||||
|
beforeAll,
|
||||||
|
afterAll
|
||||||
|
} from '@jest/globals';
|
||||||
|
import {fileURLToPath} from 'url';
|
||||||
|
import * as io from '@actions/io';
|
||||||
|
import * as fs from 'fs';
|
||||||
|
import * as path from 'path';
|
||||||
|
import os from 'os';
|
||||||
|
import {XMLParser} from 'fast-xml-parser';
|
||||||
|
|
||||||
// make the os.homedir() call be local to the tests
|
// Mock @actions/core before importing source modules that depend on it
|
||||||
jest.doMock('os', () => {
|
jest.unstable_mockModule('@actions/core', () => ({
|
||||||
return {
|
info: jest.fn(),
|
||||||
homedir: jest.fn(() => __dirname)
|
warning: jest.fn(),
|
||||||
};
|
debug: jest.fn(),
|
||||||
});
|
error: jest.fn(),
|
||||||
|
notice: jest.fn(),
|
||||||
|
setFailed: jest.fn(),
|
||||||
|
setOutput: jest.fn(),
|
||||||
|
getInput: jest.fn(),
|
||||||
|
getBooleanInput: jest.fn(),
|
||||||
|
getMultilineInput: jest.fn(),
|
||||||
|
addPath: jest.fn(),
|
||||||
|
exportVariable: jest.fn(),
|
||||||
|
saveState: jest.fn(),
|
||||||
|
getState: jest.fn(),
|
||||||
|
setSecret: jest.fn(),
|
||||||
|
isDebug: jest.fn(() => false),
|
||||||
|
startGroup: jest.fn(),
|
||||||
|
endGroup: jest.fn(),
|
||||||
|
group: jest.fn((_name: string, fn: () => Promise<unknown>) => fn()),
|
||||||
|
toPlatformPath: jest.fn((p: string) => p),
|
||||||
|
toWin32Path: jest.fn((p: string) => p),
|
||||||
|
toPosixPath: jest.fn((p: string) => p)
|
||||||
|
}));
|
||||||
|
|
||||||
import * as auth from '../src/auth';
|
// Dynamic imports after mocking
|
||||||
|
const core = await import('@actions/core');
|
||||||
|
const auth = await import('../src/auth.js');
|
||||||
|
const {M2_DIR, MVN_SETTINGS_FILE} = await import('../src/constants.js');
|
||||||
|
|
||||||
const m2Dir = path.join(__dirname, auth.M2_DIR);
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||||
const settingsFile = path.join(m2Dir, auth.SETTINGS_FILE);
|
const m2Dir = path.join(__dirname, M2_DIR);
|
||||||
|
const settingsFile = path.join(m2Dir, MVN_SETTINGS_FILE);
|
||||||
|
|
||||||
describe('auth tests', () => {
|
describe('auth tests', () => {
|
||||||
|
let spyOSHomedir: any;
|
||||||
|
let spyInfo: any;
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await io.rmRF(m2Dir);
|
await io.rmRF(m2Dir);
|
||||||
|
spyOSHomedir = jest.spyOn(os, 'homedir');
|
||||||
|
spyOSHomedir.mockReturnValue(__dirname);
|
||||||
|
spyInfo = core.info as jest.Mock;
|
||||||
|
spyInfo.mockImplementation(() => null);
|
||||||
}, 300000);
|
}, 300000);
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
@@ -26,6 +68,9 @@ describe('auth tests', () => {
|
|||||||
} catch {
|
} catch {
|
||||||
console.log('Failed to remove test directories');
|
console.log('Failed to remove test directories');
|
||||||
}
|
}
|
||||||
|
jest.resetAllMocks();
|
||||||
|
jest.clearAllMocks();
|
||||||
|
jest.restoreAllMocks();
|
||||||
}, 100000);
|
}, 100000);
|
||||||
|
|
||||||
it('creates settings.xml in alternate locations', async () => {
|
it('creates settings.xml in alternate locations', async () => {
|
||||||
@@ -34,11 +79,16 @@ describe('auth tests', () => {
|
|||||||
const password = 'TOLKIEN';
|
const password = 'TOLKIEN';
|
||||||
|
|
||||||
const altHome = path.join(__dirname, 'runner', 'settings');
|
const altHome = path.join(__dirname, 'runner', 'settings');
|
||||||
const altSettingsFile = path.join(altHome, auth.SETTINGS_FILE);
|
const altSettingsFile = path.join(altHome, MVN_SETTINGS_FILE);
|
||||||
process.env[`INPUT_SETTINGS-PATH`] = altHome;
|
|
||||||
await io.rmRF(altHome); // ensure it doesn't already exist
|
await io.rmRF(altHome); // ensure it doesn't already exist
|
||||||
|
|
||||||
await auth.configAuthentication(id, username, password);
|
await auth.createAuthenticationSettings(
|
||||||
|
id,
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
altHome,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
expect(fs.existsSync(m2Dir)).toBe(false);
|
expect(fs.existsSync(m2Dir)).toBe(false);
|
||||||
expect(fs.existsSync(settingsFile)).toBe(false);
|
expect(fs.existsSync(settingsFile)).toBe(false);
|
||||||
@@ -49,7 +99,6 @@ describe('auth tests', () => {
|
|||||||
auth.generate(id, username, password)
|
auth.generate(id, username, password)
|
||||||
);
|
);
|
||||||
|
|
||||||
delete process.env[`INPUT_SETTINGS-PATH`];
|
|
||||||
await io.rmRF(altHome);
|
await io.rmRF(altHome);
|
||||||
}, 100000);
|
}, 100000);
|
||||||
|
|
||||||
@@ -58,7 +107,13 @@ describe('auth tests', () => {
|
|||||||
const username = 'UNAME';
|
const username = 'UNAME';
|
||||||
const password = 'TOKEN';
|
const password = 'TOKEN';
|
||||||
|
|
||||||
await auth.configAuthentication(id, username, password);
|
await auth.createAuthenticationSettings(
|
||||||
|
id,
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
m2Dir,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
expect(fs.existsSync(m2Dir)).toBe(true);
|
expect(fs.existsSync(m2Dir)).toBe(true);
|
||||||
expect(fs.existsSync(settingsFile)).toBe(true);
|
expect(fs.existsSync(settingsFile)).toBe(true);
|
||||||
@@ -73,7 +128,14 @@ describe('auth tests', () => {
|
|||||||
const password = 'TOKEN';
|
const password = 'TOKEN';
|
||||||
const gpgPassphrase = 'GPG';
|
const gpgPassphrase = 'GPG';
|
||||||
|
|
||||||
await auth.configAuthentication(id, username, password, gpgPassphrase);
|
await auth.createAuthenticationSettings(
|
||||||
|
id,
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
m2Dir,
|
||||||
|
true,
|
||||||
|
gpgPassphrase
|
||||||
|
);
|
||||||
|
|
||||||
expect(fs.existsSync(m2Dir)).toBe(true);
|
expect(fs.existsSync(m2Dir)).toBe(true);
|
||||||
expect(fs.existsSync(settingsFile)).toBe(true);
|
expect(fs.existsSync(settingsFile)).toBe(true);
|
||||||
@@ -92,7 +154,13 @@ describe('auth tests', () => {
|
|||||||
expect(fs.existsSync(m2Dir)).toBe(true);
|
expect(fs.existsSync(m2Dir)).toBe(true);
|
||||||
expect(fs.existsSync(settingsFile)).toBe(true);
|
expect(fs.existsSync(settingsFile)).toBe(true);
|
||||||
|
|
||||||
await auth.configAuthentication(id, username, password);
|
await auth.createAuthenticationSettings(
|
||||||
|
id,
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
m2Dir,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
expect(fs.existsSync(m2Dir)).toBe(true);
|
expect(fs.existsSync(m2Dir)).toBe(true);
|
||||||
expect(fs.existsSync(settingsFile)).toBe(true);
|
expect(fs.existsSync(settingsFile)).toBe(true);
|
||||||
@@ -101,6 +169,29 @@ describe('auth tests', () => {
|
|||||||
);
|
);
|
||||||
}, 100000);
|
}, 100000);
|
||||||
|
|
||||||
|
it('does not overwrite existing settings.xml files', async () => {
|
||||||
|
const id = 'packages';
|
||||||
|
const username = 'USERNAME';
|
||||||
|
const password = 'PASSWORD';
|
||||||
|
|
||||||
|
fs.mkdirSync(m2Dir, {recursive: true});
|
||||||
|
fs.writeFileSync(settingsFile, 'FAKE FILE');
|
||||||
|
expect(fs.existsSync(m2Dir)).toBe(true);
|
||||||
|
expect(fs.existsSync(settingsFile)).toBe(true);
|
||||||
|
|
||||||
|
await auth.createAuthenticationSettings(
|
||||||
|
id,
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
m2Dir,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(fs.existsSync(m2Dir)).toBe(true);
|
||||||
|
expect(fs.existsSync(settingsFile)).toBe(true);
|
||||||
|
expect(fs.readFileSync(settingsFile, 'utf-8')).toEqual('FAKE FILE');
|
||||||
|
}, 100000);
|
||||||
|
|
||||||
it('generates valid settings.xml with minimal configuration', () => {
|
it('generates valid settings.xml with minimal configuration', () => {
|
||||||
const id = 'packages';
|
const id = 'packages';
|
||||||
const username = 'USER';
|
const username = 'USER';
|
||||||
@@ -109,6 +200,7 @@ describe('auth tests', () => {
|
|||||||
const expectedSettings = `<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
const expectedSettings = `<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
|
||||||
|
<interactiveMode>false</interactiveMode>
|
||||||
<servers>
|
<servers>
|
||||||
<server>
|
<server>
|
||||||
<id>${id}</id>
|
<id>${id}</id>
|
||||||
@@ -130,15 +222,47 @@ describe('auth tests', () => {
|
|||||||
const expectedSettings = `<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
const expectedSettings = `<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
|
||||||
|
<interactiveMode>false</interactiveMode>
|
||||||
<servers>
|
<servers>
|
||||||
<server>
|
<server>
|
||||||
<id>${id}</id>
|
<id>${id}</id>
|
||||||
<username>\${env.${username}}</username>
|
<username>\${env.${username}}</username>
|
||||||
<password>\${env.&<>"''"><&}</password>
|
<password>\${env.&<>"''"><&}</password>
|
||||||
</server>
|
</server>
|
||||||
|
</servers>
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>setup-java-gpg</id>
|
||||||
|
<properties>
|
||||||
|
<gpg.passphraseEnvName>${gpgPassphrase}</gpg.passphraseEnvName>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
<activeProfiles>
|
||||||
|
<activeProfile>setup-java-gpg</activeProfile>
|
||||||
|
</activeProfiles>
|
||||||
|
</settings>`;
|
||||||
|
|
||||||
|
expect(auth.generate(id, username, password, gpgPassphrase)).toEqual(
|
||||||
|
expectedSettings
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('does not add a gpg profile when the passphrase env var is the maven-gpg-plugin default', () => {
|
||||||
|
const id = 'packages';
|
||||||
|
const username = 'USER';
|
||||||
|
const password = '&<>"\'\'"><&';
|
||||||
|
const gpgPassphrase = 'MAVEN_GPG_PASSPHRASE';
|
||||||
|
|
||||||
|
const expectedSettings = `<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
|
||||||
|
<interactiveMode>false</interactiveMode>
|
||||||
|
<servers>
|
||||||
<server>
|
<server>
|
||||||
<id>gpg.passphrase</id>
|
<id>${id}</id>
|
||||||
<passphrase>\${env.${gpgPassphrase}}</passphrase>
|
<username>\${env.${username}}</username>
|
||||||
|
<password>\${env.&<>"''"><&}</password>
|
||||||
</server>
|
</server>
|
||||||
</servers>
|
</servers>
|
||||||
</settings>`;
|
</settings>`;
|
||||||
@@ -147,4 +271,90 @@ describe('auth tests', () => {
|
|||||||
expectedSettings
|
expectedSettings
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('escapes settings.xml values while preserving parsed semantics', () => {
|
||||||
|
const id = `packages&<>"'é`;
|
||||||
|
const username = `USER&<>"'é`;
|
||||||
|
const password = `TOKEN&<>"'é`;
|
||||||
|
const gpgPassphrase = `GPG&<>"'é`;
|
||||||
|
|
||||||
|
const xml = auth.generate(id, username, password, gpgPassphrase);
|
||||||
|
const parsed = parseXmlObject(xml) as any;
|
||||||
|
|
||||||
|
expect(parsed.settings.interactiveMode).toBe('false');
|
||||||
|
expect(xmlElementText(xml, 'id')).toBe(id);
|
||||||
|
expect(xmlElementText(xml, 'username')).toBe(`\${env.${username}}`);
|
||||||
|
expect(xmlElementText(xml, 'password')).toBe(`\${env.${password}}`);
|
||||||
|
expect(xmlElementText(xml, 'gpg.passphraseEnvName')).toBe(gpgPassphrase);
|
||||||
|
expect(parsed.settings.activeProfiles.activeProfile).toBe('setup-java-gpg');
|
||||||
|
});
|
||||||
|
|
||||||
|
function xmlElementText(xml: string, tagName: string): string {
|
||||||
|
const match = new RegExp(`<${tagName}>([\\s\\S]*?)</${tagName}>`).exec(xml);
|
||||||
|
expect(match).not.toBeNull();
|
||||||
|
return (parseXmlObject(`<value>${match?.[1]}</value>`) as {value: string})
|
||||||
|
.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseXmlObject(xml: string): unknown {
|
||||||
|
const parser = new XMLParser({
|
||||||
|
ignoreAttributes: false,
|
||||||
|
attributeNamePrefix: '@',
|
||||||
|
parseAttributeValue: false,
|
||||||
|
parseTagValue: false,
|
||||||
|
trimValues: true
|
||||||
|
});
|
||||||
|
return parser.parse(xml);
|
||||||
|
}
|
||||||
|
|
||||||
|
it('uses deprecated input aliases and warns', () => {
|
||||||
|
const mockGetInput = core.getInput as jest.MockedFunction<
|
||||||
|
typeof core.getInput
|
||||||
|
>;
|
||||||
|
const mockWarning = core.warning as jest.MockedFunction<
|
||||||
|
typeof core.warning
|
||||||
|
>;
|
||||||
|
mockGetInput.mockImplementation(name =>
|
||||||
|
name === 'server-username' ? 'LEGACY_USERNAME' : ''
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(
|
||||||
|
auth.getInputWithDeprecatedAlias(
|
||||||
|
'server-username-env-var',
|
||||||
|
'server-username',
|
||||||
|
'GITHUB_ACTOR'
|
||||||
|
)
|
||||||
|
).toBe('LEGACY_USERNAME');
|
||||||
|
expect(mockWarning).toHaveBeenCalledWith(
|
||||||
|
"The 'server-username' input is deprecated and may be removed in a future release. Please use 'server-username-env-var' instead."
|
||||||
|
);
|
||||||
|
|
||||||
|
mockGetInput.mockReset();
|
||||||
|
mockWarning.mockReset();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('prefers the replacement input over its deprecated alias', () => {
|
||||||
|
const mockGetInput = core.getInput as jest.MockedFunction<
|
||||||
|
typeof core.getInput
|
||||||
|
>;
|
||||||
|
mockGetInput.mockImplementation(name => {
|
||||||
|
const inputs: Record<string, string> = {
|
||||||
|
'server-password-env-var': 'NEW_PASSWORD',
|
||||||
|
'server-password': 'LEGACY_PASSWORD'
|
||||||
|
};
|
||||||
|
return inputs[name] || '';
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(
|
||||||
|
auth.getInputWithDeprecatedAlias(
|
||||||
|
'server-password-env-var',
|
||||||
|
'server-password',
|
||||||
|
'GITHUB_TOKEN'
|
||||||
|
)
|
||||||
|
).toBe('NEW_PASSWORD');
|
||||||
|
expect(core.warning).toHaveBeenCalled();
|
||||||
|
|
||||||
|
mockGetInput.mockReset();
|
||||||
|
(core.warning as jest.Mock).mockReset();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,135 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
command=${1:?command is required}
|
||||||
|
tool=${2:?tool is required}
|
||||||
|
|
||||||
|
case "$tool" in
|
||||||
|
maven)
|
||||||
|
dependency_cache="$HOME/.m2/repository"
|
||||||
|
wrapper_cache="$HOME/.m2/wrapper/dists"
|
||||||
|
dependency_file="benchmark/pom.xml"
|
||||||
|
wrapper_file="benchmark/.mvn/wrapper/maven-wrapper.properties"
|
||||||
|
;;
|
||||||
|
gradle)
|
||||||
|
dependency_cache="$HOME/.gradle/caches"
|
||||||
|
wrapper_cache="$HOME/.gradle/wrapper"
|
||||||
|
dependency_file="benchmark/build.gradle"
|
||||||
|
wrapper_file="benchmark/gradle/wrapper/gradle-wrapper.properties"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unsupported tool: $tool" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$command" in
|
||||||
|
prepare)
|
||||||
|
profile=${3:?profile is required}
|
||||||
|
mkdir -p "$(dirname "$dependency_file")" "$(dirname "$wrapper_file")"
|
||||||
|
printf '// setup-java cache benchmark v1: %s\n' "$profile" > "$dependency_file"
|
||||||
|
printf '# setup-java cache benchmark v1: %s\n' "$profile" > "$wrapper_file"
|
||||||
|
;;
|
||||||
|
reset)
|
||||||
|
rm -rf "$dependency_cache" "$wrapper_cache"
|
||||||
|
;;
|
||||||
|
populate)
|
||||||
|
profile=${3:?profile is required}
|
||||||
|
case "$profile" in
|
||||||
|
small)
|
||||||
|
dependency_megabytes=8
|
||||||
|
wrapper_megabytes=2
|
||||||
|
;;
|
||||||
|
large)
|
||||||
|
dependency_megabytes=128
|
||||||
|
wrapper_megabytes=32
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unsupported profile: $profile" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
mkdir -p "$dependency_cache/setup-java-benchmark"
|
||||||
|
mkdir -p "$wrapper_cache/setup-java-benchmark"
|
||||||
|
dd if=/dev/urandom \
|
||||||
|
of="$dependency_cache/setup-java-benchmark/payload" \
|
||||||
|
bs=1048576 count="$dependency_megabytes" 2>/dev/null
|
||||||
|
dd if=/dev/urandom \
|
||||||
|
of="$wrapper_cache/setup-java-benchmark/payload" \
|
||||||
|
bs=1048576 count="$wrapper_megabytes" 2>/dev/null
|
||||||
|
;;
|
||||||
|
start)
|
||||||
|
node -e "require('fs').writeFileSync('.benchmark-start', String(Date.now()))"
|
||||||
|
;;
|
||||||
|
record)
|
||||||
|
os=${3:?os is required}
|
||||||
|
profile=${4:?profile is required}
|
||||||
|
implementation=${5:?implementation is required}
|
||||||
|
iteration=${6:?iteration is required}
|
||||||
|
cache_hit=${7:?cache-hit output is required}
|
||||||
|
if [ "$cache_hit" != "true" ]; then
|
||||||
|
echo "Expected an exact dependency-cache hit for $implementation" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
test -f "$dependency_cache/setup-java-benchmark/payload"
|
||||||
|
started=$(cat .benchmark-start)
|
||||||
|
finished=$(node -e "process.stdout.write(String(Date.now()))")
|
||||||
|
elapsed=$((finished - started))
|
||||||
|
mkdir -p .benchmark-results
|
||||||
|
printf '%s,%s,%s,%s,%s,%s\n' \
|
||||||
|
"$os" "$tool" "$profile" "$implementation" "$iteration" "$elapsed" \
|
||||||
|
>> .benchmark-results/timings.csv
|
||||||
|
;;
|
||||||
|
summarize)
|
||||||
|
summary_file=${3:?summary file is required}
|
||||||
|
results_file=".benchmark-results/timings.csv"
|
||||||
|
node --input-type=module - "$results_file" "$summary_file" <<'NODE'
|
||||||
|
import fs from 'node:fs';
|
||||||
|
|
||||||
|
const [, , resultsFile, summaryFile] = process.argv;
|
||||||
|
const rows = fs
|
||||||
|
.readFileSync(resultsFile, 'utf8')
|
||||||
|
.trim()
|
||||||
|
.split('\n')
|
||||||
|
.map(line => {
|
||||||
|
const [os, tool, profile, implementation, iteration, elapsed] =
|
||||||
|
line.split(',');
|
||||||
|
return {os, tool, profile, implementation, iteration, elapsed: +elapsed};
|
||||||
|
});
|
||||||
|
const average = implementation => {
|
||||||
|
const values = rows
|
||||||
|
.filter(row => row.implementation === implementation)
|
||||||
|
.map(row => row.elapsed);
|
||||||
|
if (values.length === 0) {
|
||||||
|
throw new Error(`No ${implementation} benchmark results were recorded`);
|
||||||
|
}
|
||||||
|
return Math.round(values.reduce((sum, value) => sum + value, 0) / values.length);
|
||||||
|
};
|
||||||
|
const baseline = average('baseline');
|
||||||
|
const candidate = average('candidate');
|
||||||
|
const change = (((candidate - baseline) / baseline) * 100).toFixed(1);
|
||||||
|
const {os, tool, profile} = rows[0];
|
||||||
|
const lines = [
|
||||||
|
`### ${tool} ${profile} cache restore on ${os}`,
|
||||||
|
'',
|
||||||
|
'| Implementation | Iteration | Wall time (ms) |',
|
||||||
|
'| --- | ---: | ---: |',
|
||||||
|
...rows.map(
|
||||||
|
row =>
|
||||||
|
`| ${row.implementation} | ${row.iteration} | ${row.elapsed} |`
|
||||||
|
),
|
||||||
|
`| **baseline average** | | **${baseline}** |`,
|
||||||
|
`| **candidate average** | | **${candidate}** |`,
|
||||||
|
'',
|
||||||
|
`Candidate change from baseline: **${change}%**`,
|
||||||
|
''
|
||||||
|
];
|
||||||
|
fs.appendFileSync(summaryFile, `${lines.join('\n')}\n`);
|
||||||
|
NODE
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unsupported command: $command" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
import {jest, describe, it, expect, afterEach} from '@jest/globals';
|
||||||
|
|
||||||
|
jest.unstable_mockModule('@actions/cache', () => ({
|
||||||
|
isFeatureAvailable: jest.fn()
|
||||||
|
}));
|
||||||
|
|
||||||
|
jest.unstable_mockModule('@actions/core', () => ({
|
||||||
|
warning: jest.fn(),
|
||||||
|
debug: jest.fn(),
|
||||||
|
getInput: jest.fn(),
|
||||||
|
getBooleanInput: jest.fn(),
|
||||||
|
getMultilineInput: jest.fn(),
|
||||||
|
info: jest.fn(),
|
||||||
|
error: jest.fn(),
|
||||||
|
notice: jest.fn(),
|
||||||
|
setFailed: jest.fn(),
|
||||||
|
setOutput: jest.fn(),
|
||||||
|
addPath: jest.fn(),
|
||||||
|
exportVariable: jest.fn(),
|
||||||
|
saveState: jest.fn(),
|
||||||
|
getState: jest.fn(),
|
||||||
|
setSecret: jest.fn(),
|
||||||
|
isDebug: jest.fn(() => false),
|
||||||
|
startGroup: jest.fn(),
|
||||||
|
endGroup: jest.fn(),
|
||||||
|
group: jest.fn((_name: string, fn: () => Promise<unknown>) => fn()),
|
||||||
|
toPlatformPath: jest.fn((p: string) => p),
|
||||||
|
toWin32Path: jest.fn((p: string) => p),
|
||||||
|
toPosixPath: jest.fn((p: string) => p)
|
||||||
|
}));
|
||||||
|
|
||||||
|
const cache = await import('@actions/cache');
|
||||||
|
const core = await import('@actions/core');
|
||||||
|
const {isCacheFeatureAvailable} = await import('../src/cache-feature.js');
|
||||||
|
|
||||||
|
describe('isCacheFeatureAvailable', () => {
|
||||||
|
it('is disabled on GHES when cache feature is unavailable', () => {
|
||||||
|
(cache.isFeatureAvailable as jest.Mock<any>).mockImplementation(
|
||||||
|
() => false
|
||||||
|
);
|
||||||
|
const warningMock = core.warning as jest.Mock;
|
||||||
|
const message =
|
||||||
|
'Caching is only supported on GHES version >= 3.5. If you are on a version >= 3.5, please check with your GHES admin if the Actions cache service is enabled or not.';
|
||||||
|
|
||||||
|
try {
|
||||||
|
process.env['GITHUB_SERVER_URL'] = 'http://example.com';
|
||||||
|
expect(isCacheFeatureAvailable()).toBe(false);
|
||||||
|
expect(warningMock).toHaveBeenCalledWith(message);
|
||||||
|
} finally {
|
||||||
|
delete process.env['GITHUB_SERVER_URL'];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
it('is disabled on dotcom when cache feature is unavailable', () => {
|
||||||
|
(cache.isFeatureAvailable as jest.Mock<any>).mockImplementation(
|
||||||
|
() => false
|
||||||
|
);
|
||||||
|
const warningMock = core.warning as jest.Mock;
|
||||||
|
const message =
|
||||||
|
'The runner was not able to contact the cache service. Caching will be skipped';
|
||||||
|
|
||||||
|
try {
|
||||||
|
process.env['GITHUB_SERVER_URL'] = 'http://github.com';
|
||||||
|
expect(isCacheFeatureAvailable()).toBe(false);
|
||||||
|
expect(warningMock).toHaveBeenCalledWith(message);
|
||||||
|
} finally {
|
||||||
|
delete process.env['GITHUB_SERVER_URL'];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
it('is enabled when cache feature is available', () => {
|
||||||
|
(cache.isFeatureAvailable as jest.Mock<any>).mockImplementation(() => true);
|
||||||
|
expect(isCacheFeatureAvailable()).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
jest.resetAllMocks();
|
||||||
|
jest.clearAllMocks();
|
||||||
|
});
|
||||||
|
});
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
|||||||
|
.gradle
|
||||||
|
**/build/
|
||||||
|
!src/**/build/
|
||||||
|
|
||||||
|
# Ignore Gradle GUI config
|
||||||
|
gradle-app.setting
|
||||||
|
|
||||||
|
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||||
|
!gradle-wrapper.jar
|
||||||
|
|
||||||
|
# Cache of project
|
||||||
|
.gradletasknamecache
|
||||||
Vendored
+17
@@ -0,0 +1,17 @@
|
|||||||
|
plugins {
|
||||||
|
id 'java'
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
implementation 'org.codehaus.groovy:groovy:1.8.6'
|
||||||
|
}
|
||||||
|
tasks.register('downloadDependencies') {
|
||||||
|
doLast {
|
||||||
|
def total = configurations.compileClasspath.inject (0) { sum, file ->
|
||||||
|
sum + file.length()
|
||||||
|
}
|
||||||
|
println total
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
.gradle
|
||||||
|
**/build/
|
||||||
|
!src/**/build/
|
||||||
|
|
||||||
|
# Ignore Gradle GUI config
|
||||||
|
gradle-app.setting
|
||||||
|
|
||||||
|
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||||
|
!gradle-wrapper.jar
|
||||||
|
|
||||||
|
# Cache of project
|
||||||
|
.gradletasknamecache
|
||||||
Vendored
+17
@@ -0,0 +1,17 @@
|
|||||||
|
plugins {
|
||||||
|
id 'java'
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
implementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
|
||||||
|
}
|
||||||
|
tasks.register('downloadDependencies') {
|
||||||
|
doLast {
|
||||||
|
def total = configurations.compileClasspath.inject (0) { sum, file ->
|
||||||
|
sum + file.length()
|
||||||
|
}
|
||||||
|
println total
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
target/
|
||||||
|
pom.xml.tag
|
||||||
|
pom.xml.releaseBackup
|
||||||
|
pom.xml.versionsBackup
|
||||||
|
pom.xml.next
|
||||||
|
release.properties
|
||||||
|
dependency-reduced-pom.xml
|
||||||
|
buildNumber.properties
|
||||||
|
.mvn/timing.properties
|
||||||
|
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
|
||||||
|
.mvn/wrapper/maven-wrapper.jar
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.12/apache-maven-3.9.12-bin.zip
|
||||||
Vendored
+16
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>io.github.actions</groupId>
|
||||||
|
<artifactId>setup-java-maven-example</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter-api</artifactId>
|
||||||
|
<version>5.7.2</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
target/
|
||||||
|
pom.xml.tag
|
||||||
|
pom.xml.releaseBackup
|
||||||
|
pom.xml.versionsBackup
|
||||||
|
pom.xml.next
|
||||||
|
release.properties
|
||||||
|
dependency-reduced-pom.xml
|
||||||
|
buildNumber.properties
|
||||||
|
.mvn/timing.properties
|
||||||
|
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
|
||||||
|
.mvn/wrapper/maven-wrapper.jar
|
||||||
Vendored
+15
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>io.github.actions</groupId>
|
||||||
|
<artifactId>setup-java-maven2-example</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-lang3</artifactId>
|
||||||
|
<version>3.12.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
target/
|
||||||
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
ThisBuild / scalaVersion := "2.12.15"
|
||||||
|
|
||||||
|
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
sbt.version=1.6.2
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
target/
|
||||||
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
ThisBuild / scalaVersion := "2.12.15"
|
||||||
|
|
||||||
|
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "2.1.1"
|
||||||
Executable
+39
@@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Assert whether a directory exists, for use in the e2e cache workflows.
|
||||||
|
#
|
||||||
|
# Usage: check-dir.sh <dir> [present|absent]
|
||||||
|
#
|
||||||
|
# present (default): fail if <dir> does NOT exist, otherwise list its contents.
|
||||||
|
# absent: fail if <dir> DOES exist.
|
||||||
|
#
|
||||||
|
# Call with already-expanded paths (e.g. "$HOME/.gradle/caches") to avoid
|
||||||
|
# tilde-expansion pitfalls.
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
if [ "$#" -lt 1 ]; then
|
||||||
|
echo "Usage: check-dir.sh <dir> [present|absent]" >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
dir=$1
|
||||||
|
mode=${2:-present}
|
||||||
|
|
||||||
|
case "$mode" in
|
||||||
|
present)
|
||||||
|
if [ ! -d "$dir" ]; then
|
||||||
|
echo "::error::The $dir directory does not exist unexpectedly"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ls "$dir"
|
||||||
|
;;
|
||||||
|
absent)
|
||||||
|
if [ -d "$dir" ]; then
|
||||||
|
echo "::error::The $dir directory exists unexpectedly"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "::error::Unknown mode '$mode' (expected 'present' or 'absent')"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
import {afterEach, describe, expect, it, jest} from '@jest/globals';
|
||||||
|
import {createHash} from 'crypto';
|
||||||
|
import fs from 'fs';
|
||||||
|
import os from 'os';
|
||||||
|
import path from 'path';
|
||||||
|
|
||||||
|
import {calculateChecksum, verifyChecksum} from '../src/checksum.js';
|
||||||
|
import type {ChecksumMetadata} from '../src/distributions/base-models.js';
|
||||||
|
|
||||||
|
const temporaryPaths: string[] = [];
|
||||||
|
|
||||||
|
async function temporaryFile(contents: string): Promise<string> {
|
||||||
|
const directory = await fs.promises.mkdtemp(
|
||||||
|
path.join(os.tmpdir(), 'setup-java-checksum-')
|
||||||
|
);
|
||||||
|
const file = path.join(directory, 'archive');
|
||||||
|
await fs.promises.writeFile(file, contents);
|
||||||
|
temporaryPaths.push(directory);
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
|
||||||
|
afterEach(async () => {
|
||||||
|
await Promise.all(
|
||||||
|
temporaryPaths
|
||||||
|
.splice(0)
|
||||||
|
.map(item => fs.promises.rm(item, {recursive: true, force: true}))
|
||||||
|
);
|
||||||
|
jest.restoreAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('verifyChecksum', () => {
|
||||||
|
it.each(['sha256', 'sha512'] as const)(
|
||||||
|
'verifies a matching %s digest',
|
||||||
|
async algorithm => {
|
||||||
|
const contents = `jdk archive for ${algorithm}`;
|
||||||
|
const file = await temporaryFile(contents);
|
||||||
|
const value = createHash(algorithm).update(contents).digest('hex');
|
||||||
|
|
||||||
|
await expect(
|
||||||
|
verifyChecksum(
|
||||||
|
file,
|
||||||
|
{algorithm, value: value.toUpperCase()},
|
||||||
|
{distribution: 'Test', version: '21.0.1'}
|
||||||
|
)
|
||||||
|
).resolves.toBeUndefined();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it('reports mismatch context and both digests', async () => {
|
||||||
|
const file = await temporaryFile('corrupt archive');
|
||||||
|
const expected = 'a'.repeat(64);
|
||||||
|
const actual = await calculateChecksum(file, 'sha256');
|
||||||
|
|
||||||
|
await expect(
|
||||||
|
verifyChecksum(
|
||||||
|
file,
|
||||||
|
{algorithm: 'sha256', value: expected},
|
||||||
|
{distribution: 'Corretto', version: '21.0.8'}
|
||||||
|
)
|
||||||
|
).rejects.toThrow(
|
||||||
|
`Checksum verification failed for Corretto version 21.0.8: sha256 expected ${expected}, actual ${actual}.`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('rejects malformed digest metadata before reading the file', async () => {
|
||||||
|
await expect(
|
||||||
|
verifyChecksum(
|
||||||
|
'/missing/archive',
|
||||||
|
{algorithm: 'sha512', value: 'not-a-digest'},
|
||||||
|
{distribution: 'Test', version: '17'}
|
||||||
|
)
|
||||||
|
).rejects.toThrow(
|
||||||
|
'Malformed sha512 checksum metadata: expected a 128-character hexadecimal digest.'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([undefined, null, 123])(
|
||||||
|
'reports a malformed digest when the value is %p',
|
||||||
|
async value => {
|
||||||
|
const checksum = {
|
||||||
|
algorithm: 'sha256',
|
||||||
|
value
|
||||||
|
} as unknown as ChecksumMetadata;
|
||||||
|
|
||||||
|
await expect(
|
||||||
|
verifyChecksum('/missing/archive', checksum, {
|
||||||
|
distribution: 'Test',
|
||||||
|
version: '17'
|
||||||
|
})
|
||||||
|
).rejects.toThrow(
|
||||||
|
'Malformed sha256 checksum metadata: expected a 64-character hexadecimal digest.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it('rejects unsupported algorithms without leaking source query parameters', async () => {
|
||||||
|
const checksum = {
|
||||||
|
algorithm: 'md5',
|
||||||
|
value: 'a'.repeat(32),
|
||||||
|
source: 'https://vendor.example/checksum.txt?token=secret-value#private'
|
||||||
|
} as unknown as ChecksumMetadata;
|
||||||
|
|
||||||
|
let message = '';
|
||||||
|
try {
|
||||||
|
await verifyChecksum('/missing/archive', checksum, {
|
||||||
|
distribution: 'Test',
|
||||||
|
version: '17'
|
||||||
|
});
|
||||||
|
} catch (error) {
|
||||||
|
message = (error as Error).message;
|
||||||
|
}
|
||||||
|
|
||||||
|
expect(message).toContain(
|
||||||
|
"Unsupported checksum algorithm 'md5' from https://vendor.example/checksum.txt"
|
||||||
|
);
|
||||||
|
expect(message).not.toContain('secret-value');
|
||||||
|
expect(message).not.toContain('token=');
|
||||||
|
expect(message).not.toContain('#private');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('surfaces file read errors', async () => {
|
||||||
|
await expect(
|
||||||
|
verifyChecksum(
|
||||||
|
'/missing/archive',
|
||||||
|
{algorithm: 'sha256', value: 'a'.repeat(64)},
|
||||||
|
{distribution: 'Test', version: '17'}
|
||||||
|
)
|
||||||
|
).rejects.toMatchObject({code: 'ENOENT'});
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,353 @@
|
|||||||
|
import {
|
||||||
|
jest,
|
||||||
|
describe,
|
||||||
|
it,
|
||||||
|
expect,
|
||||||
|
beforeEach,
|
||||||
|
afterEach,
|
||||||
|
beforeAll,
|
||||||
|
afterAll
|
||||||
|
} from '@jest/globals';
|
||||||
|
import fs from 'fs';
|
||||||
|
import os from 'os';
|
||||||
|
import path from 'path';
|
||||||
|
|
||||||
|
// Mock @actions/cache before importing source modules
|
||||||
|
const real_cache_module = await import('@actions/cache');
|
||||||
|
jest.unstable_mockModule('@actions/cache', () => ({
|
||||||
|
...real_cache_module,
|
||||||
|
saveCache: jest.fn(),
|
||||||
|
restoreCache: jest.fn()
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Mock @actions/core before importing source modules that depend on it
|
||||||
|
jest.unstable_mockModule('@actions/core', () => ({
|
||||||
|
info: jest.fn(),
|
||||||
|
warning: jest.fn(),
|
||||||
|
debug: jest.fn(),
|
||||||
|
error: jest.fn(),
|
||||||
|
notice: jest.fn(),
|
||||||
|
setFailed: jest.fn(),
|
||||||
|
setOutput: jest.fn(),
|
||||||
|
getInput: jest.fn(),
|
||||||
|
getBooleanInput: jest.fn(),
|
||||||
|
getMultilineInput: jest.fn(),
|
||||||
|
addPath: jest.fn(),
|
||||||
|
exportVariable: jest.fn(),
|
||||||
|
saveState: jest.fn(),
|
||||||
|
getState: jest.fn(),
|
||||||
|
setSecret: jest.fn(),
|
||||||
|
isDebug: jest.fn(() => false),
|
||||||
|
startGroup: jest.fn(),
|
||||||
|
endGroup: jest.fn(),
|
||||||
|
group: jest.fn((_name: string, fn: () => Promise<unknown>) => fn()),
|
||||||
|
toPlatformPath: jest.fn((p: string) => p),
|
||||||
|
toWin32Path: jest.fn((p: string) => p),
|
||||||
|
toPosixPath: jest.fn((p: string) => p)
|
||||||
|
}));
|
||||||
|
|
||||||
|
const real_util_module = await import('../src/util.js');
|
||||||
|
jest.unstable_mockModule('../src/util.js', () => ({
|
||||||
|
...real_util_module,
|
||||||
|
extractJdkFile: jest.fn(),
|
||||||
|
getDownloadArchiveExtension: jest.fn(),
|
||||||
|
getToolcachePath: jest.fn(),
|
||||||
|
isJobStatusSuccess: jest.fn(),
|
||||||
|
renameWinArchive: jest.fn(),
|
||||||
|
isVersionSatisfies: real_util_module.isVersionSatisfies,
|
||||||
|
getTempDir: real_util_module.getTempDir
|
||||||
|
}));
|
||||||
|
|
||||||
|
// Dynamic imports after mocking
|
||||||
|
const core = await import('@actions/core');
|
||||||
|
const cache = await import('@actions/cache');
|
||||||
|
const {run: cleanup} = await import('../src/cleanup-java.js');
|
||||||
|
const util = await import('../src/util.js');
|
||||||
|
const {registerJdk, buildJdkCacheKey} = await import('../src/jdk-cache.js');
|
||||||
|
|
||||||
|
const jdkTempRoots: string[] = [];
|
||||||
|
|
||||||
|
describe('cleanup', () => {
|
||||||
|
let spyWarning: any;
|
||||||
|
let spyInfo: any;
|
||||||
|
let spyCacheSave: any;
|
||||||
|
let spyJobStatusSuccess: any;
|
||||||
|
let spyCoreError: any;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
spyWarning = core.warning as jest.Mock;
|
||||||
|
spyWarning.mockImplementation(() => null);
|
||||||
|
|
||||||
|
spyInfo = core.info as jest.Mock;
|
||||||
|
spyInfo.mockImplementation(() => null);
|
||||||
|
|
||||||
|
spyCacheSave = cache.saveCache as jest.Mock;
|
||||||
|
|
||||||
|
spyJobStatusSuccess = util.isJobStatusSuccess as jest.Mock;
|
||||||
|
spyJobStatusSuccess.mockReturnValue(true);
|
||||||
|
|
||||||
|
// Mock core.error to suppress error logs
|
||||||
|
spyCoreError = core.error as jest.Mock;
|
||||||
|
spyCoreError.mockImplementation(() => {});
|
||||||
|
|
||||||
|
createStateForSuccessfulRestore();
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
while (jdkTempRoots.length) {
|
||||||
|
fs.rmSync(jdkTempRoots.pop()!, {recursive: true, force: true});
|
||||||
|
}
|
||||||
|
resetState();
|
||||||
|
jest.resetAllMocks();
|
||||||
|
jest.clearAllMocks();
|
||||||
|
jest.restoreAllMocks();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('does not warn/fail even when the save process throws a ReserveCacheError', async () => {
|
||||||
|
spyCacheSave.mockImplementation((paths: string[], key: string) =>
|
||||||
|
Promise.reject(
|
||||||
|
new cache.ReserveCacheError(
|
||||||
|
'Unable to reserve cache with key, another job may be creating this cache.'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
(core.getInput as jest.Mock<any>).mockImplementation((name: string) => {
|
||||||
|
return name === 'cache' ? 'gradle' : '';
|
||||||
|
});
|
||||||
|
await cleanup();
|
||||||
|
expect(spyCacheSave).toHaveBeenCalled();
|
||||||
|
expect(spyWarning).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('does not fail even though the save process throws error', async () => {
|
||||||
|
spyCacheSave.mockImplementation((paths: string[], key: string) =>
|
||||||
|
Promise.reject(new Error('Unexpected error'))
|
||||||
|
);
|
||||||
|
(core.getInput as jest.Mock<any>).mockImplementation((name: string) => {
|
||||||
|
return name === 'cache' ? 'gradle' : '';
|
||||||
|
});
|
||||||
|
await cleanup();
|
||||||
|
expect(spyCacheSave).toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each(['maven', 'gradle', 'sbt'])(
|
||||||
|
'does not save the %s cache in read-only mode',
|
||||||
|
async packageManager => {
|
||||||
|
createStateForSuccessfulRestoreWithWrapper(packageManager);
|
||||||
|
(core.getInput as jest.Mock<any>).mockImplementation((name: string) => {
|
||||||
|
switch (name) {
|
||||||
|
case 'cache':
|
||||||
|
return packageManager;
|
||||||
|
case 'cache-read-only':
|
||||||
|
return 'true';
|
||||||
|
default:
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
await cleanup();
|
||||||
|
|
||||||
|
expect(spyCacheSave).not.toHaveBeenCalled();
|
||||||
|
expect(core.getState).not.toHaveBeenCalled();
|
||||||
|
expect(spyInfo).toHaveBeenCalledWith(
|
||||||
|
'Cache saving is skipped because cache-read-only is enabled.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it('saves the cache when read-only mode is explicitly disabled', async () => {
|
||||||
|
spyCacheSave.mockResolvedValue(0);
|
||||||
|
(core.getInput as jest.Mock<any>).mockImplementation((name: string) => {
|
||||||
|
switch (name) {
|
||||||
|
case 'cache':
|
||||||
|
return 'maven';
|
||||||
|
case 'cache-read-only':
|
||||||
|
return 'false';
|
||||||
|
default:
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
await cleanup();
|
||||||
|
|
||||||
|
expect(spyCacheSave).toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('saves the JDK cache without dependency caching', async () => {
|
||||||
|
const {key, path: jdkPath, state} = createRegisteredJdk();
|
||||||
|
(core.getInput as jest.Mock<any>).mockImplementation((name: string) =>
|
||||||
|
name === 'cache-jdk' ? 'true' : ''
|
||||||
|
);
|
||||||
|
(core.getState as jest.Mock<any>).mockImplementation((name: string) =>
|
||||||
|
name === 'jdk-caches' ? state : ''
|
||||||
|
);
|
||||||
|
spyCacheSave.mockResolvedValue(1);
|
||||||
|
|
||||||
|
await cleanup();
|
||||||
|
|
||||||
|
expect(spyCacheSave).toHaveBeenCalledWith([jdkPath], key);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('does not save a JDK cache when cache-jdk is disabled', async () => {
|
||||||
|
(core.getInput as jest.Mock<any>).mockImplementation((name: string) =>
|
||||||
|
name === 'cache-jdk' ? 'false' : ''
|
||||||
|
);
|
||||||
|
|
||||||
|
await cleanup();
|
||||||
|
|
||||||
|
expect(spyCacheSave).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
['', '', false],
|
||||||
|
['', 'true', true],
|
||||||
|
['', 'false', false],
|
||||||
|
['maven', '', true],
|
||||||
|
['maven', 'true', true],
|
||||||
|
['maven', 'false', false]
|
||||||
|
])(
|
||||||
|
'uses effective JDK caching for cache=%j and cache-jdk=%j',
|
||||||
|
async (cacheInput, cacheJdkInput, expectedJdkSave) => {
|
||||||
|
const {key: jdkKey, path: jdkPath, state} = createRegisteredJdk();
|
||||||
|
(core.getInput as jest.Mock<any>).mockImplementation((name: string) => {
|
||||||
|
if (name === 'cache') return cacheInput;
|
||||||
|
if (name === 'cache-jdk') return cacheJdkInput;
|
||||||
|
return '';
|
||||||
|
});
|
||||||
|
(core.getState as jest.Mock<any>).mockImplementation((name: string) =>
|
||||||
|
name === 'jdk-caches' ? state : ''
|
||||||
|
);
|
||||||
|
spyCacheSave.mockResolvedValue(1);
|
||||||
|
|
||||||
|
await cleanup();
|
||||||
|
|
||||||
|
const jdkSaveCalls = spyCacheSave.mock.calls.filter(
|
||||||
|
([, key]) => key === jdkKey
|
||||||
|
);
|
||||||
|
expect(jdkSaveCalls).toHaveLength(expectedJdkSave ? 1 : 0);
|
||||||
|
if (expectedJdkSave) {
|
||||||
|
expect(spyCacheSave).toHaveBeenCalledWith([jdkPath], jdkKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
it('keeps saving the remaining JDK caches when one save fails', async () => {
|
||||||
|
const first = createRegisteredJdk();
|
||||||
|
const second = createRegisteredJdk('17.0.19+9');
|
||||||
|
(core.getInput as jest.Mock<any>).mockImplementation((name: string) =>
|
||||||
|
name === 'cache-jdk' ? 'true' : ''
|
||||||
|
);
|
||||||
|
(core.getState as jest.Mock<any>).mockImplementation((name: string) =>
|
||||||
|
name === 'jdk-caches' ? second.state : ''
|
||||||
|
);
|
||||||
|
spyCacheSave.mockImplementation(async (paths: string[]) => {
|
||||||
|
if (paths[0] === first.path) {
|
||||||
|
throw new Error('Unexpected save failure');
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
});
|
||||||
|
|
||||||
|
await cleanup();
|
||||||
|
|
||||||
|
expect(spyCacheSave).toHaveBeenCalledWith([first.path], first.key);
|
||||||
|
expect(spyCacheSave).toHaveBeenCalledWith([second.path], second.key);
|
||||||
|
expect(spyCoreError).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('does not save a JDK installation that was replaced after registration', async () => {
|
||||||
|
const {key, path: jdkPath, state, replace} = createRegisteredJdk();
|
||||||
|
(core.getInput as jest.Mock<any>).mockImplementation((name: string) =>
|
||||||
|
name === 'cache-jdk' ? 'true' : ''
|
||||||
|
);
|
||||||
|
(core.getState as jest.Mock<any>).mockImplementation((name: string) =>
|
||||||
|
name === 'jdk-caches' ? state : ''
|
||||||
|
);
|
||||||
|
spyCacheSave.mockResolvedValue(1);
|
||||||
|
replace();
|
||||||
|
|
||||||
|
await cleanup();
|
||||||
|
|
||||||
|
expect(spyCacheSave).not.toHaveBeenCalledWith([jdkPath], key);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function resetState() {
|
||||||
|
(core.getState as jest.Mock).mockReset();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create states to emulate a successful restore process.
|
||||||
|
*/
|
||||||
|
function createStateForSuccessfulRestore() {
|
||||||
|
(core.getState as jest.Mock<any>).mockImplementation((name: any) => {
|
||||||
|
switch (name) {
|
||||||
|
case 'cache-primary-key':
|
||||||
|
return 'setup-java-cache-primary-key';
|
||||||
|
case 'cache-matched-key':
|
||||||
|
return 'setup-java-cache-matched-key';
|
||||||
|
default:
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function createStateForSuccessfulRestoreWithWrapper(packageManager: string) {
|
||||||
|
(core.getState as jest.Mock<any>).mockImplementation((name: any) => {
|
||||||
|
switch (name) {
|
||||||
|
case 'cache-primary-key':
|
||||||
|
return 'setup-java-cache-primary-key';
|
||||||
|
case 'cache-matched-key':
|
||||||
|
return 'setup-java-cache-matched-key';
|
||||||
|
case `cache-primary-key-${packageManager}-wrapper`:
|
||||||
|
return `setup-java-${packageManager}-wrapper-primary-key`;
|
||||||
|
default:
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register a real JDK installation in a temporary tool cache so the post-job
|
||||||
|
* save sees the same installation identity that setup recorded.
|
||||||
|
*/
|
||||||
|
function createRegisteredJdk(version = '21.0.8+9') {
|
||||||
|
const root = fs.mkdtempSync(
|
||||||
|
path.join(os.tmpdir(), 'setup-java-cleanup-jdk-')
|
||||||
|
);
|
||||||
|
jdkTempRoots.push(root);
|
||||||
|
const jdkPath = path.join(
|
||||||
|
root,
|
||||||
|
'Java_temurin_jdk',
|
||||||
|
version.replace('+', '-')
|
||||||
|
);
|
||||||
|
const write = (marker: string) => {
|
||||||
|
const architecturePath = path.join(jdkPath, 'x64');
|
||||||
|
fs.rmSync(architecturePath, {recursive: true, force: true});
|
||||||
|
fs.rmSync(`${architecturePath}.complete`, {force: true});
|
||||||
|
fs.mkdirSync(architecturePath, {recursive: true});
|
||||||
|
fs.writeFileSync(path.join(architecturePath, 'release'), marker);
|
||||||
|
fs.writeFileSync(`${architecturePath}.complete`, marker);
|
||||||
|
};
|
||||||
|
write('installed');
|
||||||
|
|
||||||
|
const jdk = {
|
||||||
|
distribution: 'temurin',
|
||||||
|
packageType: 'jdk',
|
||||||
|
architecture: 'x64',
|
||||||
|
version,
|
||||||
|
source: `sha256:${path.basename(root)}`,
|
||||||
|
verification: 'unverified',
|
||||||
|
path: jdkPath
|
||||||
|
};
|
||||||
|
registerJdk(jdk);
|
||||||
|
const state = (
|
||||||
|
(core.saveState as jest.Mock).mock.calls.at(-1) as string[]
|
||||||
|
)[1];
|
||||||
|
|
||||||
|
return {
|
||||||
|
key: buildJdkCacheKey(jdk),
|
||||||
|
path: jdkPath,
|
||||||
|
state,
|
||||||
|
replace: () => write('replaced-by-a-later-step')
|
||||||
|
};
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user