Compare commits
	
		
			168 Commits
		
	
	
		
			v1.0.1
			...
			malob/upda
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 04ea987245 | |||
| 08e4e813b8 | |||
| 4b1b3d4a82 | |||
| 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 | |||
| 3019d15cad | |||
| 1253a7eed4 | |||
| 1277492cb9 | |||
| 38e0c8bd18 | |||
| 77d6565ede | |||
| ac9630fb91 | |||
| 36bb906fe0 | |||
| 012c21ec81 | |||
| 4d8dc69fc8 | |||
| 2d0e474aa9 | |||
| 034b7a7488 | |||
| 91d166793d | |||
| 7f2382879a | |||
| 01f44229d4 | |||
| d920b7da5f | |||
| 88965601fb | |||
| 655cb05195 | |||
| 81bfa641b0 | |||
| 6e1616c588 | |||
| 457d7a4579 | |||
| e494666ae9 | |||
| d94db22179 | |||
| 4003c04fbc | |||
| 9c7b108c73 | |||
| 505c9972aa | |||
| 5c87b70ffe | |||
| ea8ea84c9e | |||
| 6dc4d4a3ed | |||
| 5ef3a8d61b | |||
| 60cf21b5e7 | |||
| f63b906f27 | |||
| 9c4f82dc57 | |||
| 623089a937 | |||
| ec103c0d1a | |||
| 90c448a85d | |||
| 63d68602dd | |||
| 351c3fb96f | |||
| f6b96adea7 | |||
| c74a6f8415 | |||
| b52cd69bd2 | |||
| ae23cbb7c2 | |||
| 4bec33ae89 | |||
| 0e40802452 | |||
| 5c4dee6c5e | |||
| ae687a76f9 | |||
| f8061412c6 | |||
| d8ada524fc | |||
| 9b11fe4b5d | |||
| 2ccd1ad125 | |||
| c05b45bb91 | |||
| 7e36086f36 | |||
| 0e5545ead5 | |||
| 1bba665156 | |||
| 6924f73ee0 | |||
| 998be8d08f | |||
| 2e749e50a6 | |||
| ce88feea94 | |||
| ae11e1a1b6 | |||
| 4757680fc9 | |||
| 551e2a2770 | |||
| 9d56a3bd35 | |||
| 8ccac94e40 | |||
| 203550b542 | |||
| 2f85cc5281 | |||
| 70aff31eb7 | |||
| ddf78adea0 | |||
| f33acc6b4f | |||
| 6ae690c576 | |||
| b7e70417f9 | |||
| dbeab7ccf2 | |||
| 540a98ac02 | |||
| 4b6ff8caf0 | |||
| 8940139ee8 | |||
| 5e29577d7b | |||
| 1dac4fef05 | |||
| 797045350f | |||
| 948db7588e | |||
| 2b05c00514 | |||
| 96236d7072 | |||
| 12896dfb0f | |||
| bfbec53132 | |||
| c1c11bbc1b | |||
| cfdbba3eb5 | |||
| abe10fa040 | |||
| d5150a6a67 | |||
| 210fba7587 | |||
| ade090c5cf | |||
| d2eada383a | |||
| cda418e54a | |||
| d1d9006723 | |||
| 7d69f8015b | |||
| c8f8a264b4 | |||
| 1085a2b8cf | |||
| 495409509c | |||
| 18983b8d3d | |||
| 4450e92d78 | |||
| b8a0027e2c | |||
| 24327359f8 | |||
| dc5f78f54d | |||
| b0e5cf270d | |||
| 1b0417032a | |||
| 86e89385e5 | |||
| 56eacf97f5 | |||
| 56b5af70cf | |||
| a3e6ce2153 | |||
| 081536e071 | |||
| aba995482c | |||
| 73bee8ffce | |||
| e8e47f49d0 | |||
| 942699d9f7 | |||
| 980efe83e2 | |||
| 66e61f647e | |||
| 9557e68f0c | |||
| db9bf6b240 | |||
| dffd0c6733 | |||
| 5c4ee8507d | |||
| 4880cc0c18 | |||
| db3a754b1e | |||
| ef3ee0a8c4 | |||
| 53de71b0d5 | |||
| dd10aa8837 | |||
| 7c96a7c451 | |||
| b02f296bae | |||
| b7591442d5 | |||
| 7f04ebee9e | |||
| 7d219e5bd5 | |||
| 0cd7033504 | |||
| 204b974cf4 | |||
| 91b87ac691 | |||
| 40205d2e16 | |||
| a8e7064d5b | 
							
								
								
									
										3
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.gitattributes
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | ||||
| dist/index.js    -diff -merge | ||||
| dist/index.js    linguist-generated=true | ||||
| .licenses/** -diff linguist-generated=true | ||||
							
								
								
									
										2
									
								
								.github/CODEOWNERS
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								.github/CODEOWNERS
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,2 @@ | ||||
| * @actions/actions-service | ||||
| * @actions/virtual-environments-owners | ||||
							
								
								
									
										32
									
								
								.github/ISSUE_TEMPLATE/bug_report.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								.github/ISSUE_TEMPLATE/bug_report.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -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. | ||||
							
								
								
									
										1
									
								
								.github/ISSUE_TEMPLATE/config.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.github/ISSUE_TEMPLATE/config.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| blank_issues_enabled: false | ||||
							
								
								
									
										16
									
								
								.github/ISSUE_TEMPLATE/feature_request.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								.github/ISSUE_TEMPLATE/feature_request.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -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! --> | ||||
							
								
								
									
										9
									
								
								.github/pull_request_template.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								.github/pull_request_template.md
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | ||||
| **Description:** | ||||
| Describe your changes. | ||||
|  | ||||
| **Related issue:** | ||||
| Add link to the related issue. | ||||
|  | ||||
| **Check list:** | ||||
| - [ ] Mark if documentation changes are required. | ||||
| - [ ] Mark if tests were added or updated to cover the changes. | ||||
							
								
								
									
										33
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										33
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
										Executable file
									
								
							| @ -0,0 +1,33 @@ | ||||
| name: Build Action | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|       - releases/* | ||||
|     paths-ignore: | ||||
|       - '**.md' | ||||
|   pull_request: | ||||
|     paths-ignore: | ||||
|       - '**.md' | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         os: [ubuntu-latest, windows-latest, macos-latest] | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2 | ||||
|       - name: Setup Node.JS 12 | ||||
|         uses: actions/setup-node@v2 | ||||
|         with: | ||||
|           node-version: 12.x | ||||
|       - run: npm ci | ||||
|       - run: npm run build | ||||
|       - run: npm run format-check | ||||
|       - run: npm test | ||||
|       - name: Verify no unstaged changes | ||||
|         if: runner.os != 'windows' | ||||
|         run: bash __tests__/verify-no-unstaged-changes.sh | ||||
							
								
								
									
										113
									
								
								.github/workflows/e2e-cache.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										113
									
								
								.github/workflows/e2e-cache.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,113 @@ | ||||
| name: Validate cache | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|       - releases/* | ||||
|     paths-ignore: | ||||
|       - '**.md' | ||||
|   pull_request: | ||||
|     paths-ignore: | ||||
|       - '**.md' | ||||
|  | ||||
| defaults: | ||||
|   run: | ||||
|     shell: bash | ||||
|  | ||||
| jobs: | ||||
|   gradle-save: | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         os: [macos-latest, windows-latest, ubuntu-latest] | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - name: Run setup-java with the cache for gradle | ||||
|         uses: ./ | ||||
|         id: setup-java | ||||
|         with: | ||||
|           distribution: 'adopt' | ||||
|           java-version: '11' | ||||
|           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/gradle | ||||
|           if [ ! -d ~/.gradle/caches ]; then | ||||
|             echo "::error::The ~/.gradle/caches directory does not exist unexpectedly" | ||||
|             exit 1 | ||||
|           fi | ||||
|   gradle-restore: | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         os: [macos-latest, windows-latest, ubuntu-latest] | ||||
|     needs: gradle-save | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - name: Run setup-java with the cache for gradle | ||||
|         uses: ./ | ||||
|         id: setup-java | ||||
|         with: | ||||
|           distribution: 'adopt' | ||||
|           java-version: '11' | ||||
|           cache: gradle | ||||
|       - name: Confirm that ~/.gradle/caches directory has been made | ||||
|         run: | | ||||
|           if [ ! -d ~/.gradle/caches ]; then | ||||
|             echo "::error::The ~/.gradle/caches directory does not exist unexpectedly" | ||||
|             exit 1 | ||||
|           fi | ||||
|           ls ~/.gradle/caches/ | ||||
|   maven-save: | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         os: [macos-latest, windows-latest, ubuntu-latest] | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - name: Run setup-java with the cache for maven | ||||
|         uses: ./ | ||||
|         id: setup-java | ||||
|         with: | ||||
|           distribution: 'adopt' | ||||
|           java-version: '11' | ||||
|           cache: maven | ||||
|       - name: Create files to cache | ||||
|         run: | | ||||
|           mvn verify -f __tests__/cache/maven/pom.xml | ||||
|           if [ ! -d ~/.m2/repository ]; then | ||||
|             echo "::error::The ~/.m2/repository directory does not exist unexpectedly" | ||||
|             exit 1 | ||||
|           fi | ||||
|   maven-restore: | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         os: [macos-latest, windows-latest, ubuntu-latest] | ||||
|     needs: maven-save | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - name: Run setup-java with the cache for maven | ||||
|         uses: ./ | ||||
|         id: setup-java | ||||
|         with: | ||||
|           distribution: 'adopt' | ||||
|           java-version: '11' | ||||
|           cache: maven | ||||
|       - name: Confirm that ~/.m2/repository directory has been made | ||||
|         run: | | ||||
|           if [ ! -d ~/.m2/repository ]; then | ||||
|             echo "::error::The ~/.m2/repository directory does not exist unexpectedly" | ||||
|             exit 1 | ||||
|           fi | ||||
|           ls ~/.m2/repository | ||||
							
								
								
									
										123
									
								
								.github/workflows/e2e-local-file.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										123
									
								
								.github/workflows/e2e-local-file.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,123 @@ | ||||
| name: Validate local file | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|       - releases/* | ||||
|     paths-ignore: | ||||
|       - '**.md' | ||||
|   pull_request: | ||||
|     paths-ignore: | ||||
|       - '**.md' | ||||
|  | ||||
| jobs: | ||||
|   setup-java-local-file-adopt: | ||||
|     name: Validate installation from local file Adopt | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         os: [macos-latest, windows-latest, ubuntu-latest] | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - name: Download Adopt OpenJDK file | ||||
|         run: | | ||||
|           if ($IsLinux) { | ||||
|             $downloadUrl = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.10_9.tar.gz" | ||||
|             $localFilename = "java_package.tar.gz" | ||||
|           } elseif ($IsMacOS) { | ||||
|             $downloadUrl = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_mac_hotspot_11.0.10_9.tar.gz" | ||||
|             $localFilename = "java_package.tar.gz" | ||||
|           } elseif ($IsWindows) { | ||||
|             $downloadUrl = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_windows_hotspot_11.0.10_9.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' | ||||
|           jdkFile: ${{ runner.temp }}/${{ env.LocalFilename }} | ||||
|           java-version: '11.0.0-ea' | ||||
|           architecture: x64 | ||||
|       - name: Verify Java version | ||||
|         run: bash __tests__/verify-java.sh "11.0.10" "${{ steps.setup-java.outputs.path }}" | ||||
|         shell: bash | ||||
|  | ||||
|   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@v2 | ||||
|       - 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' | ||||
|           jdkFile: ${{ runner.temp }}/${{ env.LocalFilename }} | ||||
|           java-version: '11.0.0-ea' | ||||
|           architecture: x64 | ||||
|       - name: Verify Java version | ||||
|         run: bash __tests__/verify-java.sh "11.0" "${{ steps.setup-java.outputs.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@v2 | ||||
|       - 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' | ||||
|           jdkFile: ${{ runner.temp }}/${{ env.LocalFilename }} | ||||
|           java-version: '11.0.0-ea' | ||||
|           architecture: x64 | ||||
|       - name: Verify Java version | ||||
|         run: bash __tests__/verify-java.sh "11.0.12" "${{ steps.setup-java.outputs.path }}" | ||||
|         shell: bash | ||||
							
								
								
									
										152
									
								
								.github/workflows/e2e-publishing.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										152
									
								
								.github/workflows/e2e-publishing.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,152 @@ | ||||
| name: Validate publishing functionality | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|       - releases/* | ||||
|     paths-ignore: | ||||
|       - '**.md' | ||||
|   pull_request: | ||||
|     paths-ignore: | ||||
|       - '**.md' | ||||
|  | ||||
| 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@v2 | ||||
|       - name: setup-java | ||||
|         uses: ./ | ||||
|         id: setup-java | ||||
|         with: | ||||
|           distribution: 'adopt' | ||||
|           java-version: '11' | ||||
|           server-id: maven | ||||
|           server-username: MAVEN_USERNAME | ||||
|           server-password: MAVEN_CENTRAL_TOKEN | ||||
|           gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||||
|       - name: Validate settings.xml | ||||
|         run: | | ||||
|           $xmlPath = Join-Path $HOME ".m2" "settings.xml" | ||||
|           Get-Content $xmlPath | ForEach-Object { Write-Host $_ } | ||||
|  | ||||
|           [xml]$xml = Get-Content $xmlPath | ||||
|           $servers = $xml.settings.servers.server | ||||
|           if (($servers[0].id -ne 'maven') -or ($servers[0].username -ne '${env.MAVEN_USERNAME}') -or ($servers[0].password -ne '${env.MAVEN_CENTRAL_TOKEN}')) { | ||||
|             throw "Generated XML file is incorrect" | ||||
|           } | ||||
|  | ||||
|           if (($servers[1].id -ne 'gpg.passphrase') -or ($servers[1].passphrase -ne '${env.MAVEN_GPG_PASSPHRASE}')) { | ||||
|             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@v2 | ||||
|       - 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: 'adopt' | ||||
|           java-version: '11' | ||||
|           server-id: maven | ||||
|           server-username: MAVEN_USERNAME | ||||
|           server-password: MAVEN_CENTRAL_TOKEN | ||||
|           gpg-passphrase: 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@v2 | ||||
|       - 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: 'adopt' | ||||
|           java-version: '11' | ||||
|           server-id: maven | ||||
|           server-username: MAVEN_USERNAME | ||||
|           server-password: MAVEN_CENTRAL_TOKEN | ||||
|           overwrite-settings: false | ||||
|           gpg-passphrase: 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@v2 | ||||
|       - name: setup-java | ||||
|         uses: ./ | ||||
|         id: setup-java | ||||
|         with: | ||||
|           distribution: 'adopt' | ||||
|           java-version: '11' | ||||
|           server-id: maven | ||||
|           server-username: MAVEN_USERNAME | ||||
|           server-password: MAVEN_CENTRAL_TOKEN | ||||
|           gpg-passphrase: 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" | ||||
|           } | ||||
							
								
								
									
										192
									
								
								.github/workflows/e2e-versions.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										192
									
								
								.github/workflows/e2e-versions.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,192 @@ | ||||
| name: Validate Java e2e | ||||
| on: | ||||
|   push: | ||||
|     branches: | ||||
|       - main | ||||
|       - releases/* | ||||
|     paths-ignore: | ||||
|       - '**.md' | ||||
|   pull_request: | ||||
|     paths-ignore: | ||||
|       - '**.md' | ||||
|   schedule: | ||||
|     - cron:  '0 */12 * * *' | ||||
|   workflow_dispatch: | ||||
| jobs: | ||||
|   setup-java-major-versions: | ||||
|     name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         os: [macos-latest, windows-latest, ubuntu-latest] | ||||
|         distribution: ['temurin', 'adopt', 'adopt-openj9', 'zulu'] # internally 'adopt-hotspot' is the same as 'adopt' | ||||
|         version: ['8', '11', '16'] | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - name: setup-java | ||||
|         uses: ./ | ||||
|         id: setup-java | ||||
|         with: | ||||
|           java-version: ${{ matrix.version }} | ||||
|           distribution: ${{ matrix.distribution }} | ||||
|       - name: Verify Java | ||||
|         run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" | ||||
|         shell: bash | ||||
|  | ||||
|   setup-java-major-minor-versions: | ||||
|     name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} | ||||
|     needs: setup-java-major-versions | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         os: [macos-latest, windows-latest, ubuntu-latest] | ||||
|         distribution: ['temurin', 'zulu'] | ||||
|         version: | ||||
|         - '11.0' | ||||
|         - '8.0.302' | ||||
|         - '16.0.2+7' | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - name: setup-java | ||||
|         uses: ./ | ||||
|         id: setup-java | ||||
|         with: | ||||
|           java-version: ${{ matrix.version }} | ||||
|           distribution: ${{ matrix.distribution }} | ||||
|       - name: Verify Java | ||||
|         run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.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: [macos-latest, windows-latest, ubuntu-latest] | ||||
|         distribution: ['temurin', 'zulu'] | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - name: setup-java | ||||
|         uses: ./ | ||||
|         id: setup-java | ||||
|         with: | ||||
|           distribution: ${{ matrix.distribution }} | ||||
|           java-version: 11 | ||||
|           check-latest: true | ||||
|       - name: Verify Java | ||||
|         run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}" | ||||
|         shell: bash | ||||
|  | ||||
|   setup-java-ea-versions-zulu: | ||||
|     name: zulu ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} | ||||
|     needs: setup-java-major-minor-versions | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         os: [macos-latest, windows-latest, ubuntu-latest] | ||||
|         version: ['17-ea', '15.0.0-ea.14'] | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - name: setup-java | ||||
|         uses: ./ | ||||
|         id: setup-java | ||||
|         with: | ||||
|           java-version: ${{ matrix.version }} | ||||
|           distribution: zulu | ||||
|       - name: Verify Java | ||||
|         run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" | ||||
|         shell: bash | ||||
|  | ||||
|   setup-java-ea-versions-temurin: | ||||
|     name: temurin ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} | ||||
|     needs: setup-java-major-minor-versions | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         os: [macos-latest, windows-latest, ubuntu-latest] | ||||
|         version: ['17-ea'] | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - name: setup-java | ||||
|         uses: ./ | ||||
|         id: setup-java | ||||
|         with: | ||||
|           java-version: ${{ matrix.version }} | ||||
|           distribution: temurin | ||||
|       - name: Verify Java | ||||
|         run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.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-latest, windows-latest, ubuntu-latest] | ||||
|         distribution: ['temurin', 'zulu'] | ||||
|         java-package: ['jre'] | ||||
|         version: ['16.0'] | ||||
|         include: | ||||
|           - distribution: 'zulu' | ||||
|             java-package: jre+fx | ||||
|             version: '8' | ||||
|             os: ubuntu-latest | ||||
|           - distribution: 'zulu' | ||||
|             java-package: jdk+fx | ||||
|             version: '8.0.242' | ||||
|             os: ubuntu-latest | ||||
|         exclude: | ||||
|           # Eclipse Temurin currently doesn't publish JREs, only JDKs | ||||
|           - distribution: 'temurin' | ||||
|             java-package: 'jre' | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - name: setup-java | ||||
|         uses: ./ | ||||
|         id: setup-java | ||||
|         with: | ||||
|           java-version: ${{ matrix.version }} | ||||
|           java-package: ${{ matrix.java-package }} | ||||
|           distribution: ${{ matrix.distribution }} | ||||
|       - name: Verify Java | ||||
|         run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" | ||||
|         shell: bash | ||||
|  | ||||
|   setup-java-custom-architecture: | ||||
|     name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x86) - ${{ matrix.os }} | ||||
|     needs: setup-java-major-minor-versions | ||||
|     runs-on: ${{ matrix.os }} | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         # Only Zulu provides x86 arch for now and only for windows / ubuntu | ||||
|         os: [windows-latest, ubuntu-latest] | ||||
|         distribution: ['zulu'] | ||||
|         version: ['11'] | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - name: setup-java | ||||
|         uses: ./ | ||||
|         id: setup-java | ||||
|         with: | ||||
|           distribution: ${{ matrix.distribution }} | ||||
|           java-version: ${{ matrix.version }} | ||||
|           architecture: x86 | ||||
|       - name: Verify Java | ||||
|         run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" | ||||
|         shell: bash | ||||
							
								
								
									
										20
									
								
								.github/workflows/licensed.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								.github/workflows/licensed.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,20 @@ | ||||
| name: Licensed | ||||
|  | ||||
| on: | ||||
|   push: {branches: main} | ||||
|   pull_request: {branches: main} | ||||
|  | ||||
| jobs: | ||||
|   test: | ||||
|     runs-on: ubuntu-latest | ||||
|     name: Check licenses | ||||
|     steps: | ||||
|       - uses: actions/checkout@v2 | ||||
|       - run: npm ci | ||||
|       - name: Install licensed | ||||
|         run: | | ||||
|           cd $RUNNER_TEMP | ||||
|           curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.12.2/licensed-2.12.2-linux-x64.tar.gz | ||||
|           sudo tar -xzf licensed.tar.gz | ||||
|           sudo mv licensed /usr/local/bin/licensed | ||||
|       - run: licensed status | ||||
							
								
								
									
										28
									
								
								.github/workflows/release-new-action-version.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								.github/workflows/release-new-action-version.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,28 @@ | ||||
| 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.1.0 | ||||
|       with: | ||||
|         source-tag: ${{ env.TAG_NAME }} | ||||
|         slack-webhook: ${{ secrets.SLACK_WEBHOOK }} | ||||
							
								
								
									
										26
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										26
									
								
								.github/workflows/workflow.yml
									
									
									
									
										vendored
									
									
								
							| @ -1,26 +0,0 @@ | ||||
| name: Main workflow | ||||
| on: [push] | ||||
| jobs: | ||||
|   run: | ||||
|     name: Run | ||||
|     runs-on: ${{ matrix.operating-system }} | ||||
|     strategy: | ||||
|       matrix: | ||||
|         operating-system: [ubuntu-latest, windows-latest] | ||||
|     steps: | ||||
|     - name: Checkout | ||||
|       uses: actions/checkout@master | ||||
|  | ||||
|     - name: Set Node.js 10.x | ||||
|       uses: actions/setup-node@master | ||||
|       with: | ||||
|         version: 10.x | ||||
|  | ||||
|     - name: npm install | ||||
|       run: npm install | ||||
|  | ||||
|     - name: Lint | ||||
|       run: npm run format-check | ||||
|  | ||||
|     - name: npm test | ||||
|       run: npm test | ||||
							
								
								
									
										96
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										96
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,2 +1,96 @@ | ||||
| !node_modules/ | ||||
| # Ignore node_modules, ncc is used to compile nodejs modules into a single file | ||||
| node_modules/ | ||||
| __tests__/runner/* | ||||
|  | ||||
| # Ignore js files that are transpiled from ts files in src/ | ||||
| lib/ | ||||
|  | ||||
| # Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore | ||||
| # Logs | ||||
| logs | ||||
| *.log | ||||
| npm-debug.log* | ||||
| yarn-debug.log* | ||||
| yarn-error.log* | ||||
| lerna-debug.log* | ||||
|  | ||||
| # Diagnostic reports (https://nodejs.org/api/report.html) | ||||
| report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||||
|  | ||||
| # Runtime data | ||||
| pids | ||||
| *.pid | ||||
| *.seed | ||||
| *.pid.lock | ||||
|  | ||||
| # Directory for instrumented libs generated by jscoverage/JSCover | ||||
| lib-cov | ||||
|  | ||||
| # Coverage directory used by tools like istanbul | ||||
| coverage | ||||
| *.lcov | ||||
|  | ||||
| # nyc test coverage | ||||
| .nyc_output | ||||
|  | ||||
| # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||||
| .grunt | ||||
|  | ||||
| # Bower dependency directory (https://bower.io/) | ||||
| bower_components | ||||
|  | ||||
| # node-waf configuration | ||||
| .lock-wscript | ||||
|  | ||||
| # Compiled binary addons (https://nodejs.org/api/addons.html) | ||||
| build/Release | ||||
|  | ||||
| # Dependency directories | ||||
| jspm_packages/ | ||||
|  | ||||
| # TypeScript v1 declaration files | ||||
| typings/ | ||||
|  | ||||
| # TypeScript cache | ||||
| *.tsbuildinfo | ||||
|  | ||||
| # Optional npm cache directory | ||||
| .npm | ||||
|  | ||||
| # Optional eslint cache | ||||
| .eslintcache | ||||
|  | ||||
| # Optional REPL history | ||||
| .node_repl_history | ||||
|  | ||||
| # Output of 'npm pack' | ||||
| *.tgz | ||||
|  | ||||
| # Yarn Integrity file | ||||
| .yarn-integrity | ||||
|  | ||||
| # dotenv environment variables file | ||||
| .env | ||||
| .env.test | ||||
|  | ||||
| # parcel-bundler cache (https://parceljs.org/) | ||||
| .cache | ||||
|  | ||||
| # next.js build output | ||||
| .next | ||||
|  | ||||
| # nuxt.js build output | ||||
| .nuxt | ||||
|  | ||||
| # vuepress build output | ||||
| .vuepress/dist | ||||
|  | ||||
| # Serverless directories | ||||
| .serverless/ | ||||
|  | ||||
| # FuseBox cache | ||||
| .fusebox/ | ||||
|  | ||||
| # DynamoDB Local files | ||||
| .dynamodb/ | ||||
| .vscode/ | ||||
|  | ||||
							
								
								
									
										15
									
								
								.licensed.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								.licensed.yml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| sources: | ||||
|   npm: true | ||||
|  | ||||
| allowed: | ||||
|   - apache-2.0 | ||||
|   - 0bsd | ||||
|   - bsd-2-clause | ||||
|   - bsd-3-clause | ||||
|   - isc | ||||
|   - mit | ||||
|   - cc0-1.0 | ||||
|   - unlicense | ||||
|  | ||||
| reviewed: | ||||
|   npm: | ||||
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@actions/cache.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@actions/cache.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@actions/core.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@actions/core.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@actions/exec.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@actions/exec.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@actions/glob-0.1.2.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@actions/glob-0.1.2.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@actions/glob-0.2.0.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@actions/glob-0.2.0.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@actions/http-client.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@actions/http-client.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@actions/io.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@actions/io.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@actions/tool-cache.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@actions/tool-cache.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@azure/abort-controller.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@azure/abort-controller.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-asynciterator-polyfill.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-asynciterator-polyfill.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-auth.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-auth.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-http.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-http.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-lro.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-lro.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-paging.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-paging.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-tracing.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@azure/core-tracing.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@azure/logger.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@azure/logger.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@azure/ms-rest-js.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@azure/ms-rest-js.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@azure/storage-blob.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@azure/storage-blob.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@oozcitak/dom.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@oozcitak/dom.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@oozcitak/infra.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@oozcitak/infra.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@oozcitak/url.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@oozcitak/url.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@oozcitak/util.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@oozcitak/util.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@opencensus/web-types.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@opencensus/web-types.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@opentelemetry/api.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@opentelemetry/api.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@types/node-12.20.4.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@types/node-12.20.4.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@types/node-14.6.2.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@types/node-14.6.2.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@types/node-fetch.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@types/node-fetch.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/@types/tunnel.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/@types/tunnel.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/abort-controller.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/abort-controller.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/argparse.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/argparse.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/asynckit.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/asynckit.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/balanced-match.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/balanced-match.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/brace-expansion.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/brace-expansion.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/combined-stream.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/combined-stream.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/concat-map.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/concat-map.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/delayed-stream.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/delayed-stream.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/esprima.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/esprima.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/event-target-shim.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/event-target-shim.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/events.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/events.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/form-data-2.5.1.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/form-data-2.5.1.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/form-data-3.0.1.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/form-data-3.0.1.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/ip-regex.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/ip-regex.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/js-yaml.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/js-yaml.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/lru-cache.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/lru-cache.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/mime-db.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/mime-db.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/mime-types.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/mime-types.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/minimatch.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/minimatch.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/node-fetch.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/node-fetch.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/process.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/process.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/psl.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/psl.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/punycode.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/punycode.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/sax.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/sax.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/semver-6.3.0.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/semver-6.3.0.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/semver-7.3.4.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/semver-7.3.4.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/sprintf-js.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/sprintf-js.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/tough-cookie-3.0.1.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/tough-cookie-3.0.1.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/tough-cookie-4.0.0.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/tough-cookie-4.0.0.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/tslib-1.14.1.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/tslib-1.14.1.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/tslib-2.3.0.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/tslib-2.3.0.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/tunnel.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/tunnel.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/universalify.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/universalify.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/uuid-3.4.0.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/uuid-3.4.0.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/uuid-8.3.2.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/uuid-8.3.2.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/xml2js.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/xml2js.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/xmlbuilder.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/xmlbuilder.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/xmlbuilder2.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/xmlbuilder2.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								.licenses/npm/yallist.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.licenses/npm/yallist.dep.yml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -1,11 +1,11 @@ | ||||
| { | ||||
|     "printWidth": 80, | ||||
|     "tabWidth": 2, | ||||
|     "useTabs": false, | ||||
|     "semi": true, | ||||
|     "singleQuote": true, | ||||
|     "trailingComma": "none", | ||||
|     "bracketSpacing": false, | ||||
|     "arrowParens": "avoid", | ||||
|     "parser": "typescript" | ||||
|   } | ||||
|   "printWidth": 100, | ||||
|   "tabWidth": 2, | ||||
|   "useTabs": false, | ||||
|   "semi": true, | ||||
|   "singleQuote": true, | ||||
|   "trailingComma": "none", | ||||
|   "bracketSpacing": true, | ||||
|   "arrowParens": "avoid", | ||||
|   "parser": "typescript" | ||||
| } | ||||
|  | ||||
							
								
								
									
										38
									
								
								CONTRIBUTING.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								CONTRIBUTING.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,38 @@ | ||||
| # Contributors | ||||
|  | ||||
| ### Checkin | ||||
|  | ||||
| - Do checkin source (src) | ||||
| - Do checkin a single index.js file after running `ncc` | ||||
| - Do not checking node_modules | ||||
|  | ||||
| ### NCC | ||||
|  | ||||
| In order to avoid uploading `node_modules` to the repository, we use [zeit/ncc](https://github.com/zeit/ncc) to create multiple `index.js` files that gets saved under `dist/`. | ||||
| There are two main files that get created | ||||
| - `dist/setup/index.js` | ||||
|    - Core `setup-java` logic that downloads and installs an appropriate version of Java  | ||||
|    - Handling creating a `settings.xml` file to make it easier to publish packages | ||||
| - `dist/cleanup/index/js` | ||||
|    -  Extra cleanup script that is used to remove GPG keys (needed for certain self-hosted runner scenarios) | ||||
|  | ||||
| If you're developing locally, after doing `npm install`, you can use the following commands | ||||
| ```yaml | ||||
| npm run build # runs tsc along with ncc | ||||
| npm run format # runs prettier --write | ||||
| npm run format-check # runs prettier --check | ||||
| npm run test # runs jest | ||||
| npm run release # add all the necessary ncc files under dist/* to the git staging area | ||||
| ``` | ||||
|  | ||||
| Any files generated using `tsc` will be added to `lib/*`, however those files also are not uploaded to the repository and are excluded using `.gitignore`. | ||||
|  | ||||
| ### Testing | ||||
|  | ||||
| Tests are included under `_tests_/*` and can be run using `npm run-script test`. | ||||
|  | ||||
| We ask that you include a link to a successful run that utilizes the changes you are working on. For example, if your changes are in the branch `newAwesomeFeature`, then show an example run that uses `setup-python@newAwesomeFeature` or `my-fork@newAwesomeFeature`. This will help speed up testing and help us confirm that there are no breaking changes or bugs. | ||||
|  | ||||
| ### Licensed | ||||
|  | ||||
| This repository uses a tool called [Licensed](https://github.com/github/licensed) to verify third party dependencies. You may need to locally install licensed and run `licensed cache` to update the dependency cache if you install or update a production dependency. If licensed cache is unable to determine the dependency, you may need to modify the cache file yourself to put the correct license. You should still verify the dependency, licensed is a tool to help, but is not a substitute for human review of dependencies. | ||||
							
								
								
									
										144
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										144
									
								
								README.md
									
									
									
									
									
								
							| @ -4,61 +4,149 @@ | ||||
|   <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> | ||||
| </p> | ||||
|  | ||||
| This action sets up a java environment for use in actions by: | ||||
| This action provides the following functionality for GitHub Actions runners: | ||||
| - Downloading and setting up a requested version of Java. See [Usage](#Usage) for a list of supported distributions | ||||
| - Extracting and caching custom version of Java from a local file | ||||
| - Configuring runner for publishing using Apache Maven | ||||
| - Configuring runner for publishing using Gradle | ||||
| - Configuring runner for using GPG private key | ||||
| - Registering problem matchers for error output | ||||
| - Caching dependencies managed by Apache Maven | ||||
| - Caching dependencies managed by Gradle | ||||
|  | ||||
| - optionally downloading and caching a version of java by version and adding to PATH. Downloads from [Azul's Zulu distribution](http://static.azul.com/zulu/bin/). | ||||
| - registering problem matchers for error output | ||||
| ## V2 vs V1 | ||||
| - V2 supports custom distributions and provides support for Zulu OpenJDK, Eclipse Temurin and Adopt OpenJDK  out of the box. V1 supports only Zulu OpenJDK | ||||
| - V2 requires you to specify distribution along with the version. V1 defaults to Zulu OpenJDK, only version input is required. Follow [the migration guide](docs/switching-to-v2.md) to switch from V1 to V2 | ||||
|  | ||||
| # Usage | ||||
| ## Usage | ||||
| Inputs `java-version` and `distribution` are mandatory. See [Supported distributions](#supported-distributions) section for a list of available options. | ||||
|  | ||||
| See [action.yml](action.yml) | ||||
|  | ||||
| Basic: | ||||
| ### Basic | ||||
| **Eclipse Temurin** | ||||
| ```yaml | ||||
| steps: | ||||
| - uses: actions/checkout@latest | ||||
| - uses: actions/setup-java@v1 | ||||
| - uses: actions/checkout@v2 | ||||
| - uses: actions/setup-java@v2 | ||||
|   with: | ||||
|     java-version: '9.0.4' // The JDK version to make available on the path. Takes a whole or semver Jdk version, or 1.x syntax (e.g. 1.8 => Jdk 8.x) | ||||
|     architecture: x64 // (x64 or x86) - defaults to x64 | ||||
|     distribution: 'temurin' # See 'Supported distributions' for available options | ||||
|     java-version: '11' | ||||
| - run: java -cp java HelloWorldApp | ||||
| ``` | ||||
|  | ||||
| From local file: | ||||
| **Zulu OpenJDK** | ||||
| ```yaml | ||||
| steps: | ||||
| - uses: actions/checkout@master | ||||
| - uses: actions/setup-java@v1 | ||||
| - uses: actions/checkout@v2 | ||||
| - uses: actions/setup-java@v2 | ||||
|   with: | ||||
|     java-version: '4.0.0' | ||||
|     architecture: x64 | ||||
|     jdkFile: <path to jdkFile> // Optional - jdkFile to install java from. Useful for versions not supported by Azul | ||||
|     distribution: 'zulu' # See 'Supported distributions' for available options | ||||
|     java-version: '11' | ||||
| - run: java -cp java HelloWorldApp | ||||
| ``` | ||||
|  | ||||
| Matrix Testing: | ||||
| #### Supported version syntax | ||||
| The `java-version` input supports an exact version or a version range using [SemVer](https://semver.org/) notation: | ||||
| - major versions: `8`, `11`, `16` | ||||
| - more specific versions: `11.0`, `11.0.4`, `8.0.232`, `8.0.282+8` | ||||
| - early access (EA) versions: `15-ea`, `15.0.0-ea`, `15.0.0-ea.2`, `15.0.0+2-ea` | ||||
|  | ||||
| #### Supported distributions | ||||
| Currently, the following distributions are supported: | ||||
| | Keyword | Distribution | Official site | License | ||||
| |-|-|-|-| | ||||
| | `temurin` | Eclipse Temurin | [Link](https://adoptium.net/) | [Link](https://adoptium.net/about.html) | ||||
| | `zulu` | Zulu OpenJDK | [Link](https://www.azul.com/downloads/zulu-community/?package=jdk) | [Link](https://www.azul.com/products/zulu-and-zulu-enterprise/zulu-terms-of-use/) | | ||||
| | `adopt` or `adopt-hotspot` | Adopt OpenJDK Hotspot | [Link](https://adoptopenjdk.net/) | [Link](https://adoptopenjdk.net/about.html) | | ||||
| | `adopt-openj9` | Adopt OpenJDK OpenJ9 | [Link](https://adoptopenjdk.net/) | [Link](https://adoptopenjdk.net/about.html) | ||||
|  | ||||
| **NOTE:** The different distributors can provide discrepant list of available versions / supported configurations. Please refer to the official documentation to see the list of supported versions. | ||||
|  | ||||
| **NOTE:** Adopt OpenJDK got moved to Eclipse Temurin and won't be updated anymore. It is highly recommended to migrate workflows from `adopt` to `temurin` to keep receiving software and security updates. See more details in the [Good-bye AdoptOpenJDK post](https://blog.adoptopenjdk.net/2021/08/goodbye-adoptopenjdk-hello-adoptium/). | ||||
|  | ||||
| ### Caching packages dependencies | ||||
| The action has a built-in functionality for caching and restoring dependencies. It uses [actions/cache](https://github.com/actions/cache) under hood for caching dependencies but requires less configuration settings. Supported package managers are gradle and maven. The cache input is optional, and caching is turned off by default. | ||||
|  | ||||
| #### Caching gradle dependencies | ||||
| ```yaml | ||||
| steps: | ||||
| - uses: actions/checkout@v2 | ||||
| - uses: actions/setup-java@v2 | ||||
|   with: | ||||
|     distribution: 'temurin' | ||||
|     java-version: '11' | ||||
|     cache: 'gradle' | ||||
| - run: ./gradlew build | ||||
| ``` | ||||
|  | ||||
| #### Caching maven dependencies | ||||
| ```yaml | ||||
| steps: | ||||
| - uses: actions/checkout@v2 | ||||
| - uses: actions/setup-java@v2 | ||||
|   with: | ||||
|     distribution: 'temurin' | ||||
|     java-version: '11' | ||||
|     cache: 'maven' | ||||
| - name: Build with Maven | ||||
|   run: mvn -B package --file pom.xml | ||||
| ``` | ||||
|  | ||||
| ### Check latest | ||||
| In the basic examples above, the `check-latest` flag defaults to `false`. When set to `false`, the action tries to first resolve a version of Java from the local tool cache on the runner. If unable to find a specific version in the cache, the action will download a version of Java. Use the default or set `check-latest` to `false` if you prefer a faster more consistent setup experience that prioritizes trying to use the cached versions at the expense of newer versions sometimes being available for download. | ||||
|  | ||||
| If `check-latest` is set to `true`, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, the latest version of Java will be downloaded. Set `check-latest` to `true` if you want the most up-to-date version of Java to always be used. Setting `check-latest` to `true` has performance implications as downloading versions of Java is slower than using cached versions. | ||||
|  | ||||
| For Java distributions that are not cached on Hosted images, `check-latest` always behaves as `true` and downloads Java on-flight. Check out [Hosted Tool Cache](docs/advanced-usage.md#Hosted-Tool-Cache) for more details about pre-cached Java versions.   | ||||
|  | ||||
|  | ||||
| ```yaml | ||||
| steps: | ||||
| - uses: actions/checkout@v2 | ||||
| - uses: actions/setup-java@v2 | ||||
|   with: | ||||
|     distribution: 'adopt' | ||||
|     java-version: '11' | ||||
|     check-latest: true | ||||
| - run: java -cp java HelloWorldApp | ||||
| ``` | ||||
|  | ||||
| ### Testing against different Java versions | ||||
| ```yaml | ||||
| jobs: | ||||
|   build: | ||||
|     runs-on: ubuntu-16.04 | ||||
|     runs-on: ubuntu-20.04 | ||||
|     strategy: | ||||
|       matrix: | ||||
|         java: [ '1.6', '9.0.x', '12.0.2' ] | ||||
|     name: Java ${{ matrix.java }} sample | ||||
|         java: [ '8', '11', '13', '15' ] | ||||
|     name: Java ${{ matrix.Java }} sample | ||||
|     steps: | ||||
|       - uses: actions/checkout@master | ||||
|       - uses: actions/checkout@v2 | ||||
|       - name: Setup java | ||||
|         uses: actions/setup-java@v1 | ||||
|         uses: actions/setup-java@v2 | ||||
|         with: | ||||
|           distribution: '<distribution>' | ||||
|           java-version: ${{ matrix.java }} | ||||
|           architecture: x64 | ||||
|       - run: java -cp java HelloWorldApp | ||||
| ``` | ||||
|  | ||||
| # License | ||||
| ### Advanced | ||||
| - [Selecting a Java distribution](docs/advanced-usage.md#Selecting-a-Java-distribution) | ||||
|   - [Eclipse Temurin](docs/advanced-usage.md#Eclipse-Temurin) | ||||
|   - [Adopt](docs/advanced-usage.md#Adopt) | ||||
|   - [Zulu](docs/advanced-usage.md#Zulu) | ||||
| - [Installing custom Java package type](docs/advanced-usage.md#Installing-custom-Java-package-type) | ||||
| - [Installing custom Java architecture](docs/advanced-usage.md#Installing-custom-Java-architecture) | ||||
| - [Installing custom Java distribution from 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) | ||||
| - [Publishing using Gradle](docs/advanced-usage.md#Publishing-using-Gradle) | ||||
| - [Hosted Tool Cache](docs/advanced-usage.md#Hosted-Tool-Cache) | ||||
|  | ||||
| The scripts and documentation in this project are released under the [MIT License](LICENSE) | ||||
| ## License | ||||
|  | ||||
| # Contributions | ||||
| The scripts and documentation in this project are released under the [MIT License](LICENSE). | ||||
|  | ||||
| Contributions are welcome!  See [Contributor's Guide](docs/contributors.md) | ||||
| ## Contributions | ||||
|  | ||||
| Contributions are welcome! See [Contributor's Guide](CONTRIBUTING.md) | ||||
|  | ||||
							
								
								
									
										159
									
								
								__tests__/auth.test.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										159
									
								
								__tests__/auth.test.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,159 @@ | ||||
| import io = require('@actions/io'); | ||||
| import fs = require('fs'); | ||||
| import path = require('path'); | ||||
| import os from 'os'; | ||||
|  | ||||
| import * as auth from '../src/auth'; | ||||
|  | ||||
| const m2Dir = path.join(__dirname, auth.M2_DIR); | ||||
| const settingsFile = path.join(m2Dir, auth.SETTINGS_FILE); | ||||
|  | ||||
| describe('auth tests', () => { | ||||
|   let spyOSHomedir: jest.SpyInstance; | ||||
|  | ||||
|   beforeEach(async () => { | ||||
|     await io.rmRF(m2Dir); | ||||
|     spyOSHomedir = jest.spyOn(os, 'homedir'); | ||||
|     spyOSHomedir.mockReturnValue(__dirname); | ||||
|   }, 300000); | ||||
|  | ||||
|   afterAll(async () => { | ||||
|     try { | ||||
|       await io.rmRF(m2Dir); | ||||
|     } catch { | ||||
|       console.log('Failed to remove test directories'); | ||||
|     } | ||||
|     jest.resetAllMocks(); | ||||
|     jest.clearAllMocks(); | ||||
|     jest.restoreAllMocks(); | ||||
|   }, 100000); | ||||
|  | ||||
|   it('creates settings.xml in alternate locations', async () => { | ||||
|     const id = 'packages'; | ||||
|     const username = 'UNAMI'; | ||||
|     const password = 'TOLKIEN'; | ||||
|  | ||||
|     const altHome = path.join(__dirname, 'runner', 'settings'); | ||||
|     const altSettingsFile = path.join(altHome, auth.SETTINGS_FILE); | ||||
|     await io.rmRF(altHome); // ensure it doesn't already exist | ||||
|  | ||||
|     await auth.createAuthenticationSettings(id, username, password, altHome, true); | ||||
|  | ||||
|     expect(fs.existsSync(m2Dir)).toBe(false); | ||||
|     expect(fs.existsSync(settingsFile)).toBe(false); | ||||
|  | ||||
|     expect(fs.existsSync(altHome)).toBe(true); | ||||
|     expect(fs.existsSync(altSettingsFile)).toBe(true); | ||||
|     expect(fs.readFileSync(altSettingsFile, 'utf-8')).toEqual( | ||||
|       auth.generate(id, username, password) | ||||
|     ); | ||||
|  | ||||
|     await io.rmRF(altHome); | ||||
|   }, 100000); | ||||
|  | ||||
|   it('creates settings.xml with minimal configuration', async () => { | ||||
|     const id = 'packages'; | ||||
|     const username = 'UNAME'; | ||||
|     const password = 'TOKEN'; | ||||
|  | ||||
|     await auth.createAuthenticationSettings(id, username, password, m2Dir, true); | ||||
|  | ||||
|     expect(fs.existsSync(m2Dir)).toBe(true); | ||||
|     expect(fs.existsSync(settingsFile)).toBe(true); | ||||
|     expect(fs.readFileSync(settingsFile, 'utf-8')).toEqual(auth.generate(id, username, password)); | ||||
|   }, 100000); | ||||
|  | ||||
|   it('creates settings.xml with additional configuration', async () => { | ||||
|     const id = 'packages'; | ||||
|     const username = 'UNAME'; | ||||
|     const password = 'TOKEN'; | ||||
|     const gpgPassphrase = 'GPG'; | ||||
|  | ||||
|     await auth.createAuthenticationSettings(id, username, password, m2Dir, true, gpgPassphrase); | ||||
|  | ||||
|     expect(fs.existsSync(m2Dir)).toBe(true); | ||||
|     expect(fs.existsSync(settingsFile)).toBe(true); | ||||
|     expect(fs.readFileSync(settingsFile, 'utf-8')).toEqual( | ||||
|       auth.generate(id, username, password, gpgPassphrase) | ||||
|     ); | ||||
|   }, 100000); | ||||
|  | ||||
|   it('overwrites 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, true); | ||||
|  | ||||
|     expect(fs.existsSync(m2Dir)).toBe(true); | ||||
|     expect(fs.existsSync(settingsFile)).toBe(true); | ||||
|     expect(fs.readFileSync(settingsFile, 'utf-8')).toEqual(auth.generate(id, username, password)); | ||||
|   }, 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', () => { | ||||
|     const id = 'packages'; | ||||
|     const username = 'USER'; | ||||
|     const password = '&<>"\'\'"><&'; | ||||
|  | ||||
|     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"> | ||||
|   <servers> | ||||
|     <server> | ||||
|       <id>${id}</id> | ||||
|       <username>\${env.${username}}</username> | ||||
|       <password>\${env.&<>"''"><&}</password> | ||||
|     </server> | ||||
|   </servers> | ||||
| </settings>`; | ||||
|  | ||||
|     expect(auth.generate(id, username, password)).toEqual(expectedSettings); | ||||
|   }); | ||||
|  | ||||
|   it('generates valid settings.xml with additional configuration', () => { | ||||
|     const id = 'packages'; | ||||
|     const username = 'USER'; | ||||
|     const password = '&<>"\'\'"><&'; | ||||
|     const gpgPassphrase = '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"> | ||||
|   <servers> | ||||
|     <server> | ||||
|       <id>${id}</id> | ||||
|       <username>\${env.${username}}</username> | ||||
|       <password>\${env.&<>"''"><&}</password> | ||||
|     </server> | ||||
|     <server> | ||||
|       <id>gpg.passphrase</id> | ||||
|       <passphrase>\${env.${gpgPassphrase}}</passphrase> | ||||
|     </server> | ||||
|   </servers> | ||||
| </settings>`; | ||||
|  | ||||
|     expect(auth.generate(id, username, password, gpgPassphrase)).toEqual(expectedSettings); | ||||
|   }); | ||||
| }); | ||||
							
								
								
									
										232
									
								
								__tests__/cache.test.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										232
									
								
								__tests__/cache.test.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,232 @@ | ||||
| import { mkdtempSync } from 'fs'; | ||||
| import { tmpdir } from 'os'; | ||||
| import { join } from 'path'; | ||||
| import { restore, save } from '../src/cache'; | ||||
| import * as fs from 'fs'; | ||||
| import * as os from 'os'; | ||||
| import * as core from '@actions/core'; | ||||
| import * as cache from '@actions/cache'; | ||||
|  | ||||
| describe('dependency cache', () => { | ||||
|   const ORIGINAL_RUNNER_OS = process.env['RUNNER_OS']; | ||||
|   const ORIGINAL_GITHUB_WORKSPACE = process.env['GITHUB_WORKSPACE']; | ||||
|   const ORIGINAL_CWD = process.cwd(); | ||||
|   let workspace: string; | ||||
|   let spyInfo: jest.SpyInstance<void, Parameters<typeof core.info>>; | ||||
|   let spyWarning: jest.SpyInstance<void, Parameters<typeof core.warning>>; | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     workspace = mkdtempSync(join(tmpdir(), 'setup-java-cache-')); | ||||
|     switch (os.platform()) { | ||||
|       case 'darwin': | ||||
|         process.env['RUNNER_OS'] = 'macOS'; | ||||
|         break; | ||||
|       case 'win32': | ||||
|         process.env['RUNNER_OS'] = 'Windows'; | ||||
|         break; | ||||
|       case 'linux': | ||||
|         process.env['RUNNER_OS'] = 'Linux'; | ||||
|         break; | ||||
|       default: | ||||
|         throw new Error(`unknown platform: ${os.platform()}`); | ||||
|     } | ||||
|     process.chdir(workspace); | ||||
|     // This hack is necessary because @actions/glob ignores files not in the GITHUB_WORKSPACE | ||||
|     // https://git.io/Jcxig | ||||
|     process.env['GITHUB_WORKSPACE'] = projectRoot(workspace); | ||||
|   }); | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     spyInfo = jest.spyOn(core, 'info'); | ||||
|     spyWarning = jest.spyOn(core, 'warning'); | ||||
|   }); | ||||
|  | ||||
|   afterEach(() => { | ||||
|     process.chdir(ORIGINAL_CWD); | ||||
|     process.env['GITHUB_WORKSPACE'] = ORIGINAL_GITHUB_WORKSPACE; | ||||
|     process.env['RUNNER_OS'] = ORIGINAL_RUNNER_OS; | ||||
|     resetState(); | ||||
|   }); | ||||
|  | ||||
|   describe('restore', () => { | ||||
|     let spyCacheRestore: jest.SpyInstance< | ||||
|       ReturnType<typeof cache.restoreCache>, | ||||
|       Parameters<typeof cache.restoreCache> | ||||
|     >; | ||||
|  | ||||
|     beforeEach(() => { | ||||
|       spyCacheRestore = jest | ||||
|         .spyOn(cache, 'restoreCache') | ||||
|         .mockImplementation((paths: string[], primaryKey: string) => Promise.resolve(undefined)); | ||||
|     }); | ||||
|  | ||||
|     it('throws error if unsupported package manager specified', () => { | ||||
|       return expect(restore('ant')).rejects.toThrowError('unknown package manager specified: ant'); | ||||
|     }); | ||||
|  | ||||
|     describe('for maven', () => { | ||||
|       it('throws error if no pom.xml found', async () => { | ||||
|         await expect(restore('maven')).rejects.toThrowError( | ||||
|           `No file in ${projectRoot( | ||||
|             workspace | ||||
|           )} matched to [**/pom.xml], make sure you have checked out the target repository` | ||||
|         ); | ||||
|       }); | ||||
|       it('downloads cache', async () => { | ||||
|         createFile(join(workspace, 'pom.xml')); | ||||
|  | ||||
|         await restore('maven'); | ||||
|         expect(spyCacheRestore).toBeCalled(); | ||||
|         expect(spyWarning).not.toBeCalled(); | ||||
|         expect(spyInfo).toBeCalledWith('maven cache is not found'); | ||||
|       }); | ||||
|     }); | ||||
|     describe('for gradle', () => { | ||||
|       it('throws error if no build.gradle found', async () => { | ||||
|         await expect(restore('gradle')).rejects.toThrowError( | ||||
|           `No file in ${projectRoot( | ||||
|             workspace | ||||
|           )} matched to [**/*.gradle*,**/gradle-wrapper.properties], make sure you have checked out the target repository` | ||||
|         ); | ||||
|       }); | ||||
|       it('downloads cache based on build.gradle', async () => { | ||||
|         createFile(join(workspace, 'build.gradle')); | ||||
|  | ||||
|         await restore('gradle'); | ||||
|         expect(spyCacheRestore).toBeCalled(); | ||||
|         expect(spyWarning).not.toBeCalled(); | ||||
|         expect(spyInfo).toBeCalledWith('gradle cache is not found'); | ||||
|       }); | ||||
|       it('downloads cache based on build.gradle.kts', async () => { | ||||
|         createFile(join(workspace, 'build.gradle.kts')); | ||||
|  | ||||
|         await restore('gradle'); | ||||
|         expect(spyCacheRestore).toBeCalled(); | ||||
|         expect(spyWarning).not.toBeCalled(); | ||||
|         expect(spyInfo).toBeCalledWith('gradle cache is not found'); | ||||
|       }); | ||||
|     }); | ||||
|   }); | ||||
|   describe('save', () => { | ||||
|     let spyCacheSave: jest.SpyInstance< | ||||
|       ReturnType<typeof cache.saveCache>, | ||||
|       Parameters<typeof cache.saveCache> | ||||
|     >; | ||||
|  | ||||
|     beforeEach(() => { | ||||
|       spyCacheSave = jest | ||||
|         .spyOn(cache, 'saveCache') | ||||
|         .mockImplementation((paths: string[], key: string) => Promise.resolve(0)); | ||||
|     }); | ||||
|  | ||||
|     it('throws error if unsupported package manager specified', () => { | ||||
|       return expect(save('ant')).rejects.toThrowError('unknown package manager specified: ant'); | ||||
|     }); | ||||
|  | ||||
|     describe('for maven', () => { | ||||
|       it('uploads cache even if no pom.xml found', async () => { | ||||
|         createStateForMissingBuildFile(); | ||||
|         await save('maven'); | ||||
|         expect(spyCacheSave).toBeCalled(); | ||||
|         expect(spyWarning).not.toBeCalled(); | ||||
|       }); | ||||
|       it('does not upload cache if no restore run before', async () => { | ||||
|         createFile(join(workspace, 'pom.xml')); | ||||
|  | ||||
|         await save('maven'); | ||||
|         expect(spyCacheSave).not.toBeCalled(); | ||||
|         expect(spyWarning).toBeCalledWith('Error retrieving key from state.'); | ||||
|       }); | ||||
|       it('uploads cache', async () => { | ||||
|         createFile(join(workspace, 'pom.xml')); | ||||
|         createStateForSuccessfulRestore(); | ||||
|  | ||||
|         await save('maven'); | ||||
|         expect(spyCacheSave).toBeCalled(); | ||||
|         expect(spyWarning).not.toBeCalled(); | ||||
|         expect(spyInfo).toBeCalledWith(expect.stringMatching(/^Cache saved with the key:.*/)); | ||||
|       }); | ||||
|     }); | ||||
|     describe('for gradle', () => { | ||||
|       it('uploads cache even if no build.gradle found', async () => { | ||||
|         createStateForMissingBuildFile(); | ||||
|  | ||||
|         await save('gradle'); | ||||
|         expect(spyCacheSave).toBeCalled(); | ||||
|         expect(spyWarning).not.toBeCalled(); | ||||
|       }); | ||||
|       it('does not upload cache if no restore run before', async () => { | ||||
|         createFile(join(workspace, 'build.gradle')); | ||||
|  | ||||
|         await save('gradle'); | ||||
|         expect(spyCacheSave).not.toBeCalled(); | ||||
|         expect(spyWarning).toBeCalledWith('Error retrieving key from state.'); | ||||
|       }); | ||||
|       it('uploads cache based on build.gradle', async () => { | ||||
|         createFile(join(workspace, 'build.gradle')); | ||||
|         createStateForSuccessfulRestore(); | ||||
|  | ||||
|         await save('gradle'); | ||||
|         expect(spyCacheSave).toBeCalled(); | ||||
|         expect(spyWarning).not.toBeCalled(); | ||||
|         expect(spyInfo).toBeCalledWith(expect.stringMatching(/^Cache saved with the key:.*/)); | ||||
|       }); | ||||
|       it('uploads cache based on build.gradle.kts', async () => { | ||||
|         createFile(join(workspace, 'build.gradle.kts')); | ||||
|         createStateForSuccessfulRestore(); | ||||
|  | ||||
|         await save('gradle'); | ||||
|         expect(spyCacheSave).toBeCalled(); | ||||
|         expect(spyWarning).not.toBeCalled(); | ||||
|         expect(spyInfo).toBeCalledWith(expect.stringMatching(/^Cache saved with the key:.*/)); | ||||
|       }); | ||||
|     }); | ||||
|   }); | ||||
| }); | ||||
|  | ||||
| function resetState() { | ||||
|   jest.spyOn(core, 'getState').mockReset(); | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Create states to emulate a restore process without build file. | ||||
|  */ | ||||
| function createStateForMissingBuildFile() { | ||||
|   jest.spyOn(core, 'getState').mockImplementation(name => { | ||||
|     switch (name) { | ||||
|       case 'cache-primary-key': | ||||
|         return 'setup-java-cache-'; | ||||
|       default: | ||||
|         return ''; | ||||
|     } | ||||
|   }); | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Create states to emulate a successful restore process. | ||||
|  */ | ||||
| function createStateForSuccessfulRestore() { | ||||
|   jest.spyOn(core, 'getState').mockImplementation(name => { | ||||
|     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 createFile(path: string) { | ||||
|   core.info(`created a file at ${path}`); | ||||
|   fs.writeFileSync(path, ''); | ||||
| } | ||||
|  | ||||
| function projectRoot(workspace: string): string { | ||||
|   if (os.platform() === 'darwin') { | ||||
|     return `/private${workspace}`; | ||||
|   } else { | ||||
|     return workspace; | ||||
|   } | ||||
| } | ||||
							
								
								
									
										12
									
								
								__tests__/cache/gradle/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								__tests__/cache/gradle/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -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 | ||||
							
								
								
									
										17
									
								
								__tests__/cache/gradle/build.gradle
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								__tests__/cache/gradle/build.gradle
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -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 | ||||
|     } | ||||
| } | ||||
							
								
								
									
										11
									
								
								__tests__/cache/maven/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								__tests__/cache/maven/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -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 | ||||
							
								
								
									
										16
									
								
								__tests__/cache/maven/pom.xml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								__tests__/cache/maven/pom.xml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -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> | ||||
							
								
								
									
										71
									
								
								__tests__/cleanup-java.test.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								__tests__/cleanup-java.test.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,71 @@ | ||||
| import { run as cleanup } from '../src/cleanup-java'; | ||||
| import * as core from '@actions/core'; | ||||
| import * as cache from '@actions/cache'; | ||||
| import * as util from '../src/util'; | ||||
|  | ||||
| describe('cleanup', () => { | ||||
|   let spyWarning: jest.SpyInstance<void, Parameters<typeof core.warning>>; | ||||
|   let spyCacheSave: jest.SpyInstance< | ||||
|     ReturnType<typeof cache.saveCache>, | ||||
|     Parameters<typeof cache.saveCache> | ||||
|   >; | ||||
|   let spyJobStatusSuccess: jest.SpyInstance; | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     spyWarning = jest.spyOn(core, 'warning'); | ||||
|     spyCacheSave = jest.spyOn(cache, 'saveCache'); | ||||
|     spyJobStatusSuccess = jest.spyOn(util, 'isJobStatusSuccess'); | ||||
|     spyJobStatusSuccess.mockReturnValue(true); | ||||
|     createStateForSuccessfulRestore(); | ||||
|   }); | ||||
|   afterEach(() => { | ||||
|     resetState(); | ||||
|   }); | ||||
|  | ||||
|   it('does not fail nor warn even when the save provess 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.' | ||||
|         ) | ||||
|       ) | ||||
|     ); | ||||
|     jest.spyOn(core, 'getInput').mockImplementation((name: string) => { | ||||
|       return name === 'cache' ? 'gradle' : ''; | ||||
|     }); | ||||
|     await cleanup(); | ||||
|     expect(spyCacheSave).toBeCalled(); | ||||
|     expect(spyWarning).not.toBeCalled(); | ||||
|   }); | ||||
|  | ||||
|   it('does not fail even though the save process throws error', async () => { | ||||
|     spyCacheSave.mockImplementation((paths: string[], key: string) => | ||||
|       Promise.reject(new Error('Unexpected error')) | ||||
|     ); | ||||
|     jest.spyOn(core, 'getInput').mockImplementation((name: string) => { | ||||
|       return name === 'cache' ? 'gradle' : ''; | ||||
|     }); | ||||
|     await cleanup(); | ||||
|     expect(spyCacheSave).toBeCalled(); | ||||
|   }); | ||||
| }); | ||||
|  | ||||
| function resetState() { | ||||
|   jest.spyOn(core, 'getState').mockReset(); | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * Create states to emulate a successful restore process. | ||||
|  */ | ||||
| function createStateForSuccessfulRestore() { | ||||
|   jest.spyOn(core, 'getState').mockImplementation(name => { | ||||
|     switch (name) { | ||||
|       case 'cache-primary-key': | ||||
|         return 'setup-java-cache-primary-key'; | ||||
|       case 'cache-matched-key': | ||||
|         return 'setup-java-cache-matched-key'; | ||||
|       default: | ||||
|         return ''; | ||||
|     } | ||||
|   }); | ||||
| } | ||||
							
								
								
									
										909
									
								
								__tests__/data/adopt.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										909
									
								
								__tests__/data/adopt.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,909 @@ | ||||
| [ | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 74181, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "09b7e6ab5d5eb4b73813f4caa793a0b616d33794a17988fa6a6b7c972e8f3dd3", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_x64_mac_hotspot_14.0.2_12.tar.gz.sha256.txt", | ||||
|                     "download_count": 23872, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_x64_mac_hotspot_14.0.2_12.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.2%2B12/OpenJDK14U-jdk_x64_mac_hotspot_14.0.2_12.tar.gz.json", | ||||
|                     "name": "OpenJDK14U-jdk_x64_mac_hotspot_14.0.2_12.tar.gz", | ||||
|                     "size": 195705010 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-14.0.2+12_adopt", | ||||
|                 "updated_at": "2020-07-16T08:55:45Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 477080, | ||||
|         "id": "MDc6UmVsZWFzZTI4NjIyMDc4.+ve8KojpqJUpsA==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/tag/jdk-14.0.2%2B12", | ||||
|         "release_name": "jdk-14.0.2+12", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2020-07-16T08:54:16Z", | ||||
|         "updated_at": "2020-07-16T08:54:16Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "build": 12, | ||||
|             "major": 14, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "14.0.2+12", | ||||
|             "security": 2, | ||||
|             "semver": "14.0.2+12" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 58023, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "b11cb192312530bcd84607631203d0c1727e672af12813078e6b525e3cce862d", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.1%2B7/OpenJDK14U-jdk_x64_mac_hotspot_14.0.1_7.tar.gz.sha256.txt", | ||||
|                     "download_count": 25276, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.1%2B7/OpenJDK14U-jdk_x64_mac_hotspot_14.0.1_7.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14.0.1%2B7/OpenJDK14U-jdk_x64_mac_hotspot_14.0.1_7.tar.gz.json", | ||||
|                     "name": "OpenJDK14U-jdk_x64_mac_hotspot_14.0.1_7.tar.gz", | ||||
|                     "size": 195769653 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-14.0.1+7_adopt", | ||||
|                 "updated_at": "2020-04-20T12:54:23Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 198607, | ||||
|         "id": "MDc6UmVsZWFzZTI1Njc4MzEw.z3NqYG25PFlG+Q==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/tag/jdk-14.0.1%2B7", | ||||
|         "release_name": "jdk-14.0.1+7", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2020-04-20T12:52:51Z", | ||||
|         "updated_at": "2020-04-20T12:52:51Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "adopt_build_number": 1, | ||||
|             "build": 7, | ||||
|             "major": 14, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "14.0.1+7", | ||||
|             "security": 1, | ||||
|             "semver": "14.0.1+7.1" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 30069, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "d358a7ff03905282348c6c80562a4da2e04eb377b60ad2152be4c90f8d580b7f", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_mac_hotspot_15.0.2_7.tar.gz.sha256.txt", | ||||
|                     "download_count": 3718, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_mac_hotspot_15.0.2_7.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.2%2B7/OpenJDK15U-jdk_x64_mac_hotspot_15.0.2_7.tar.gz.json", | ||||
|                     "name": "OpenJDK15U-jdk_x64_mac_hotspot_15.0.2_7.tar.gz", | ||||
|                     "size": 195232978 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-15.0.2+7_adopt", | ||||
|                 "updated_at": "2021-01-22T17:33:20Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 124226, | ||||
|         "id": "MDc6UmVsZWFzZTM2NzgwOTAw.X2+6VqPND3E8CA==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/tag/jdk-15.0.2%2B7", | ||||
|         "release_name": "jdk-15.0.2+7", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2021-01-22T17:31:37Z", | ||||
|         "updated_at": "2021-01-22T17:31:37Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "build": 7, | ||||
|             "major": 15, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "15.0.2+7", | ||||
|             "security": 2, | ||||
|             "semver": "15.0.2+7" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 24542, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "b8c2e2ad31f3d6676ea665d9505b06df15e23741847556612b40e3ee329fc046", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.1%2B9.1/OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz.sha256.txt", | ||||
|                     "download_count": 3274, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.1%2B9.1/OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.1%2B9.1/OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz.json", | ||||
|                     "name": "OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz", | ||||
|                     "size": 195872839 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-15.0.1+9_adopt", | ||||
|                 "updated_at": "2020-12-01T16:57:47Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 25378, | ||||
|         "id": "MDc6UmVsZWFzZTM0NjQ2MDU4.Yj2XZf+VBGAPtw==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/tag/jdk-15.0.1%2B9.1", | ||||
|         "release_name": "jdk-15.0.1+9.1", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2020-12-01T16:57:26Z", | ||||
|         "updated_at": "2020-12-01T16:57:26Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "adopt_build_number": 1, | ||||
|             "build": 9, | ||||
|             "major": 15, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "15.0.1+9", | ||||
|             "security": 1, | ||||
|             "semver": "15.0.1+9.1" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 21675, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "d32f9429c4992cef7be559a15c542011503d6bc38c89379800cd209a9d7ec539", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.1%2B9/OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz.sha256.txt", | ||||
|                     "download_count": 11935, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.1%2B9/OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15.0.1%2B9/OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz.json", | ||||
|                     "name": "OpenJDK15U-jdk_x64_mac_hotspot_15.0.1_9.tar.gz", | ||||
|                     "size": 195773522 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-15.0.1+9_adopt", | ||||
|                 "updated_at": "2020-10-23T20:48:09Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 308690, | ||||
|         "id": "MDc6UmVsZWFzZTMyOTk4MTUx.3oazo3YGfHhF3w==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/tag/jdk-15.0.1%2B9", | ||||
|         "release_name": "jdk-15.0.1+9", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2020-10-23T20:46:22Z", | ||||
|         "updated_at": "2020-10-23T20:46:22Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "build": 9, | ||||
|             "major": 15, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "15.0.1+9", | ||||
|             "security": 1, | ||||
|             "semver": "15.0.1+9" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 51254, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "bd1fc774232e2dfee93056a01f5765bd92ffb19d68dd548c233a82bb5c162be4", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15%2B36/OpenJDK15U-jdk_x64_mac_hotspot_15_36.tar.gz.sha256.txt", | ||||
|                     "download_count": 5325, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15%2B36/OpenJDK15U-jdk_x64_mac_hotspot_15_36.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/download/jdk-15%2B36/OpenJDK15U-jdk_x64_mac_hotspot_15_36.tar.gz.json", | ||||
|                     "name": "OpenJDK15U-jdk_x64_mac_hotspot_15_36.tar.gz", | ||||
|                     "size": 195853361 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-15+36_adopt", | ||||
|                 "updated_at": "2020-09-17T07:43:54Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 157313, | ||||
|         "id": "MDc6UmVsZWFzZTMxNDUwMjA0.eYpt0EBEjldfEQ==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk15-binaries/releases/tag/jdk-15%2B36", | ||||
|         "release_name": "jdk-15+36", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2020-09-17T07:42:21Z", | ||||
|         "updated_at": "2020-09-17T07:42:21Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "build": 36, | ||||
|             "major": 15, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "15+36", | ||||
|             "security": 0, | ||||
|             "semver": "15.0.0+36" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 27428, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "aabc3aebb0abf1ba64d9bd5796d0c7eb7239983f6e4c0f015b5b88be5616e4bd", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14%2B36/OpenJDK14U-jdk_x64_mac_hotspot_14_36.tar.gz.sha256.txt", | ||||
|                     "download_count": 19544, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14%2B36/OpenJDK14U-jdk_x64_mac_hotspot_14_36.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/download/jdk-14%2B36/OpenJDK14U-jdk_x64_mac_hotspot_14_36.tar.gz.json", | ||||
|                     "name": "OpenJDK14U-jdk_x64_mac_hotspot_14_36.tar.gz", | ||||
|                     "size": 201087797 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-14+36_adopt", | ||||
|                 "updated_at": "2020-03-18T12:13:05Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 364816, | ||||
|         "id": "MDc6UmVsZWFzZTI0NjMxMDAy.AY7rtvmrnWWlIg==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk14-binaries/releases/tag/jdk-14%2B36", | ||||
|         "release_name": "jdk-14+36", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2020-03-18T12:11:08Z", | ||||
|         "updated_at": "2020-03-18T12:11:08Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "adopt_build_number": 1, | ||||
|             "build": 36, | ||||
|             "major": 14, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "14+36", | ||||
|             "security": 0, | ||||
|             "semver": "14.0.0+36.1" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 63201, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "0ddb24efdf5aab541898d19b7667b149a1a64a8bd039b708fc58ee0284fa7e07", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_x64_mac_hotspot_13.0.2_8.tar.gz.sha256.txt", | ||||
|                     "download_count": 32531, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_x64_mac_hotspot_13.0.2_8.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.2%2B8/OpenJDK13U-jdk_x64_mac_hotspot_13.0.2_8.tar.gz.json", | ||||
|                     "name": "OpenJDK13U-jdk_x64_mac_hotspot_13.0.2_8.tar.gz", | ||||
|                     "size": 198206427 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-13.0.2+8_adopt", | ||||
|                 "updated_at": "2020-01-20T16:46:24Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 349677, | ||||
|         "id": "MDc6UmVsZWFzZTIyOTgxNTM1.gtZYwGfBgkb3Gg==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/tag/jdk-13.0.2%2B8", | ||||
|         "release_name": "jdk-13.0.2+8", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2020-01-20T16:42:35Z", | ||||
|         "updated_at": "2020-01-20T16:42:35Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "adopt_build_number": 1, | ||||
|             "build": 8, | ||||
|             "major": 13, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "13.0.2+8", | ||||
|             "security": 2, | ||||
|             "semver": "13.0.2+8.1" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 41508, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "9c82de98ce9bc2353bcf314d85366c9a2c572db034e10a71aa47e804e13748c1", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.1%2B9/OpenJDK13U-jdk_x64_mac_hotspot_13.0.1_9.tar.gz.sha256.txt", | ||||
|                     "download_count": 32262, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.1%2B9/OpenJDK13U-jdk_x64_mac_hotspot_13.0.1_9.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13.0.1%2B9/OpenJDK13U-jdk_x64_mac_hotspot_13.0.1_9.tar.gz.json", | ||||
|                     "name": "OpenJDK13U-jdk_x64_mac_hotspot_13.0.1_9.tar.gz", | ||||
|                     "size": 198205689 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-13.0.1+9_adopt", | ||||
|                 "updated_at": "2019-10-26T14:44:27Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 680021, | ||||
|         "id": "MDc6UmVsZWFzZTIwOTk4NDA0.srlG2TmLho/j0w==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/tag/jdk-13.0.1%2B9", | ||||
|         "release_name": "jdk-13.0.1+9", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2019-10-26T14:43:52Z", | ||||
|         "updated_at": "2019-10-26T14:43:52Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "adopt_build_number": 1, | ||||
|             "build": 9, | ||||
|             "major": 13, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "13.0.1+9", | ||||
|             "security": 1, | ||||
|             "semver": "13.0.1+9.1" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 37738, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "f948be96daba250b6695e22cb51372d2ba3060e4d778dd09c89548889783099f", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_x64_mac_hotspot_13_33.tar.gz.sha256.txt", | ||||
|                     "download_count": 37738, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_x64_mac_hotspot_13_33.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_x64_mac_hotspot_13_33.tar.gz.json", | ||||
|                     "name": "OpenJDK13U-jdk_x64_mac_hotspot_13_33.tar.gz", | ||||
|                     "size": 198189530 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-13+33_adopt", | ||||
|                 "updated_at": "2019-09-19T10:20:21Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 226200, | ||||
|         "id": "MDc6UmVsZWFzZTIwMTA0MTUy.trK7qCbNtlMWFw==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/tag/jdk-13%2B33", | ||||
|         "release_name": "jdk-13+33", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2019-09-19T10:19:58Z", | ||||
|         "updated_at": "2019-09-19T10:19:58Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "adopt_build_number": 1, | ||||
|             "build": 33, | ||||
|             "major": 13, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "13+33", | ||||
|             "security": 0, | ||||
|             "semver": "13.0.0+33.1" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 24493, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "9919eee037554d40c7d2f219bbd654f2bf119e16a2f4d284d8dedaf525ee59e6", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.sha256.txt", | ||||
|                     "download_count": 22907, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.json", | ||||
|                     "name": "OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz", | ||||
|                     "size": 198392994 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-12.0.2+10_adopt", | ||||
|                 "updated_at": "2019-07-18T20:27:24Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 396318, | ||||
|         "id": "MDc6UmVsZWFzZTE4NzE2Mzk5.S/VUFSgnrVIv8A==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/tag/jdk-12.0.2%2B10", | ||||
|         "release_name": "jdk-12.0.2+10", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2019-07-18T20:26:29Z", | ||||
|         "updated_at": "2019-07-18T20:26:29Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "adopt_build_number": 1, | ||||
|             "build": 10, | ||||
|             "major": 12, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "12.0.2+10", | ||||
|             "security": 2, | ||||
|             "semver": "12.0.2+10.1" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 5539, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "7acd697e816491d31b24d0ae1867fd63060aa738cfa388757946ae312a60b4f2", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10.3/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.sha256.txt", | ||||
|                     "download_count": 5539, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10.3/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10.3/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.json", | ||||
|                     "name": "OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz", | ||||
|                     "size": 198429049 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-12.0.2+10_adopt", | ||||
|                 "updated_at": "2019-09-19T17:17:37Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 5879, | ||||
|         "id": "MDc6UmVsZWFzZTIwMTE2ODQ3.QGQl8Nj1qkma4Q==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/tag/jdk-12.0.2%2B10.3", | ||||
|         "release_name": "jdk-12.0.2+10.3", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2019-09-19T17:17:26Z", | ||||
|         "updated_at": "2019-12-06T15:10:37Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "adopt_build_number": 3, | ||||
|             "build": 10, | ||||
|             "major": 12, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "12.0.2+10", | ||||
|             "security": 2, | ||||
|             "semver": "12.0.2+10.3" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 22794, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "2c1a46c0fab6d4bdbc443f23c3f6a313c2de47fbbd9c16b5c1133a88f6c1ab8f", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10.2/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.sha256.txt", | ||||
|                     "download_count": 637, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10.2/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10.2/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.json", | ||||
|                     "name": "OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz", | ||||
|                     "size": 198862174 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-12.0.2+10_adopt", | ||||
|                 "updated_at": "2019-08-06T10:41:10Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 23563, | ||||
|         "id": "MDc6UmVsZWFzZTE5MTAzMTI3.in65dKG+veAxOg==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/tag/jdk-12.0.2%2B10.2", | ||||
|         "release_name": "jdk-12.0.2+10.2", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2019-08-06T10:40:44Z", | ||||
|         "updated_at": "2019-08-06T10:40:44Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "adopt_build_number": 2, | ||||
|             "build": 10, | ||||
|             "major": 12, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "12.0.2+10", | ||||
|             "security": 2, | ||||
|             "semver": "12.0.2+10.2" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 24493, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "9919eee037554d40c7d2f219bbd654f2bf119e16a2f4d284d8dedaf525ee59e6", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.sha256.txt", | ||||
|                     "download_count": 22907, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10/OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz.json", | ||||
|                     "name": "OpenJDK12U-jdk_x64_mac_hotspot_12.0.2_10.tar.gz", | ||||
|                     "size": 198392994 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-12.0.2+9_adopt", | ||||
|                 "updated_at": "2019-07-18T20:27:24Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 396318, | ||||
|         "id": "MDc6UmVsZWFzZTE4NzE2Mzk5.S/VUFSgnrVIv8A==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/tag/jdk-12.0.2%2B10", | ||||
|         "release_name": "jdk-12.0.2+9", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2019-07-18T20:26:29Z", | ||||
|         "updated_at": "2019-07-18T20:26:29Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "adopt_build_number": 1, | ||||
|             "build": 10, | ||||
|             "major": 12, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "12.0.2+9", | ||||
|             "security": 2, | ||||
|             "semver": "12.0.2+9.1" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 39519, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "dcb2ab681247298eda018df24166ba01674127083fb02892acf087e6181d8c56", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.1%2B12/OpenJDK12U-jdk_x64_mac_hotspot_12.0.1_12.tar.gz.sha256.txt", | ||||
|                     "download_count": 33306, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.1%2B12/OpenJDK12U-jdk_x64_mac_hotspot_12.0.1_12.tar.gz", | ||||
|                     "name": "OpenJDK12U-jdk_x64_mac_hotspot_12.0.1_12.tar.gz", | ||||
|                     "size": 198112975 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "updated_at": "2019-04-21T15:12:34Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 1038669, | ||||
|         "id": "MDc6UmVsZWFzZTE2ODg3NDU3", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/tag/jdk-12.0.1%2B12", | ||||
|         "release_name": "jdk-12.0.1+12", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2019-04-21T15:11:56Z", | ||||
|         "updated_at": "2019-04-21T15:11:56Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "build": 12, | ||||
|             "major": 12, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "12.0.1+12", | ||||
|             "security": 1, | ||||
|             "semver": "12.0.1+12" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 3136, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "985036459d4ef0867a3fe83b0bf87877d8e66a121c7b9c145bb97bd921aaf3f1", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12%2B33/OpenJDK12U-jdk_x64_mac_hotspot_12_33.tar.gz.sha256.txt", | ||||
|                     "download_count": 1905, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12%2B33/OpenJDK12U-jdk_x64_mac_hotspot_12_33.tar.gz", | ||||
|                     "name": "OpenJDK12U-jdk_x64_mac_hotspot_12_33.tar.gz", | ||||
|                     "size": 198099074 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "updated_at": "2019-03-22T12:09:13Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 757289, | ||||
|         "id": "MDc6UmVsZWFzZTE2MjgyMjM2", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/tag/jdk-12%2B33", | ||||
|         "release_name": "jdk-12+33", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2019-03-22T12:08:43Z", | ||||
|         "updated_at": "2019-03-22T12:08:43Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "build": 33, | ||||
|             "major": 12, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "12+33", | ||||
|             "security": 0, | ||||
|             "semver": "12.0.0+33" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 75576, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "ee7c98c9d79689aca6e717965747b8bf4eec5413e89d5444cc2bd6dbd59e3811", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_mac_hotspot_11.0.10_9.tar.gz.sha256.txt", | ||||
|                     "download_count": 17426, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_mac_hotspot_11.0.10_9.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_mac_hotspot_11.0.10_9.tar.gz.json", | ||||
|                     "name": "OpenJDK11U-jdk_x64_mac_hotspot_11.0.10_9.tar.gz", | ||||
|                     "size": 186160219 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-11.0.10+9_adopt", | ||||
|                 "updated_at": "2021-01-22T14:16:47Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 636180, | ||||
|         "id": "MDc6UmVsZWFzZTM2NzcwNDUy.hAVJRiZZTufG+w==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.10%2B9", | ||||
|         "release_name": "jdk-11.0.10+9", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2021-01-22T14:15:12Z", | ||||
|         "updated_at": "2021-01-22T14:15:12Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "build": 9, | ||||
|             "major": 11, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "11.0.10+9", | ||||
|             "security": 10, | ||||
|             "semver": "11.0.10+9" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 108441, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "96bc469f9b02a3b84382a0685b0bd7935e1ad1bd82a0aab9befb5b42a17cbd77", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9.1%2B1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9.1_1.tar.gz.sha256.txt", | ||||
|                     "download_count": 22211, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9.1%2B1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9.1_1.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9.1%2B1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9.1_1.tar.gz.json", | ||||
|                     "name": "OpenJDK11U-jdk_x64_mac_hotspot_11.0.9.1_1.tar.gz", | ||||
|                     "size": 185368626 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-11.0.9.1+1_adopt", | ||||
|                 "updated_at": "2020-11-12T14:10:45Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 815676, | ||||
|         "id": "MDc6UmVsZWFzZTMzODU4MDE1.94IbKUd3vvhzsA==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.9.1%2B1", | ||||
|         "release_name": "jdk-11.0.9.1+1", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2020-11-12T14:08:55Z", | ||||
|         "updated_at": "2020-11-12T14:08:55Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "build": 1, | ||||
|             "major": 11, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "11.0.9.1+1", | ||||
|             "patch": 1, | ||||
|             "security": 9, | ||||
|             "semver": "11.0.9+101" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 45450, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "7b21961ffb2649e572721a0dfad64169b490e987937b661cb4e13a594c21e764", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11.1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz.sha256.txt", | ||||
|                     "download_count": 11117, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11.1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11.1/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz.json", | ||||
|                     "name": "OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz", | ||||
|                     "size": 186006796 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-11.0.9+11_adopt", | ||||
|                 "updated_at": "2020-10-25T14:43:54Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 423635, | ||||
|         "id": "MDc6UmVsZWFzZTMzMDI4MDcz.dRvNNRwJCgY3Xw==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.9%2B11.1", | ||||
|         "release_name": "jdk-11.0.9+11.1", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2020-10-25T13:31:15Z", | ||||
|         "updated_at": "2020-10-25T13:31:15Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "adopt_build_number": 1, | ||||
|             "build": 11, | ||||
|             "major": 11, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "11.0.9+11", | ||||
|             "security": 9, | ||||
|             "semver": "11.0.9+11.1" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 2456, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "e84b00d74f08f059829bbf121c8423dc37ff65135968c1fcda5839600be4f542", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz.sha256.txt", | ||||
|                     "download_count": 1046, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11/OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz.json", | ||||
|                     "name": "OpenJDK11U-jdk_x64_mac_hotspot_11.0.9_11.tar.gz", | ||||
|                     "size": 185532704 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-11.0.9+11_adopt", | ||||
|                 "updated_at": "2020-10-25T13:28:33Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 359580, | ||||
|         "id": "MDc6UmVsZWFzZTMyOTk4MzM5.6h9TT9pzYTK2Kg==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.9%2B11", | ||||
|         "release_name": "jdk-11.0.9+11", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2020-10-23T20:52:14Z", | ||||
|         "updated_at": "2020-10-23T20:52:14Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "build": 11, | ||||
|             "major": 11, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "11.0.9+11", | ||||
|             "security": 9, | ||||
|             "semver": "11.0.9+11" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 149393, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "4a8dadd58cdc32c7e59978971d56aec610be7ee0ddf0dc1d137bb8b78456499f", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz.sha256.txt", | ||||
|                     "download_count": 40158, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz.json", | ||||
|                     "name": "OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz", | ||||
|                     "size": 185054456 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-11.0.8+10_adopt", | ||||
|                 "updated_at": "2020-07-15T14:30:51Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 1968658, | ||||
|         "id": "MDc6UmVsZWFzZTI4NTg5Nzcz.pCNBA7G9E1o7pw==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.8%2B10", | ||||
|         "release_name": "jdk-11.0.8+10", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2020-07-15T14:29:27Z", | ||||
|         "updated_at": "2020-07-15T14:29:27Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "build": 10, | ||||
|             "major": 11, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "11.0.8+10", | ||||
|             "security": 8, | ||||
|             "semver": "11.0.8+10" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [], | ||||
|         "download_count": 1968658, | ||||
|         "id": "MDc6UmVsZWFzZTI4NTg5Nzcz.pCNBA7G9E1o7pw==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.8%2B10", | ||||
|         "release_name": "jdk-11.0.8+10", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2020-07-15T14:29:27Z", | ||||
|         "updated_at": "2020-07-15T14:29:27Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "build": 10, | ||||
|             "major": 9, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "9.0.8+10", | ||||
|             "security": 8, | ||||
|             "semver": "9.0.8+10" | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "binaries": [ | ||||
|             { | ||||
|                 "architecture": "x64", | ||||
|                 "download_count": 149393, | ||||
|                 "heap_size": "normal", | ||||
|                 "image_type": "jdk", | ||||
|                 "jvm_impl": "hotspot", | ||||
|                 "os": "mac", | ||||
|                 "package": { | ||||
|                     "checksum": "4a8dadd58cdc32c7e59978971d56aec610be7ee0ddf0dc1d137bb8b78456499f", | ||||
|                     "checksum_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz.sha256.txt", | ||||
|                     "download_count": 40158, | ||||
|                     "link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz", | ||||
|                     "metadata_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz.json", | ||||
|                     "name": "OpenJDK11U-jdk_x64_mac_hotspot_11.0.8_10.tar.gz", | ||||
|                     "size": 185054456 | ||||
|                 }, | ||||
|                 "project": "jdk", | ||||
|                 "scm_ref": "jdk-11.0.8+10_adopt", | ||||
|                 "updated_at": "2020-07-15T14:30:51Z" | ||||
|             } | ||||
|         ], | ||||
|         "download_count": 1968658, | ||||
|         "id": "MDc6UmVsZWFzZTI4NTg5Nzcz.pCNBA7G9E1o7pw==", | ||||
|         "release_link": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/tag/jdk-11.0.8%2B10", | ||||
|         "release_name": "jdk-11.0.8+10", | ||||
|         "release_type": "ga", | ||||
|         "timestamp": "2020-07-15T14:29:27Z", | ||||
|         "updated_at": "2020-07-15T14:29:27Z", | ||||
|         "vendor": "adoptopenjdk", | ||||
|         "version_data": { | ||||
|             "build": 10, | ||||
|             "major": 9, | ||||
|             "minor": 0, | ||||
|             "openjdk_version": "9.0.8+10", | ||||
|             "security": 8, | ||||
|             "semver": "9.0.7+10" | ||||
|         } | ||||
|     } | ||||
| ] | ||||
							
								
								
									
										2566
									
								
								__tests__/data/temurin.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2566
									
								
								__tests__/data/temurin.json
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										247
									
								
								__tests__/data/zulu-releases-default.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										247
									
								
								__tests__/data/zulu-releases-default.json
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,247 @@ | ||||
| [ | ||||
|   { | ||||
|     "id": 10996, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu1.8.0_05-8.1.0.10-macosx.tar.gz", | ||||
|     "name": "zulu1.8.0_05-8.1.0.10-macosx.tar.gz", | ||||
|     "zulu_version": [8, 1, 0, 10], | ||||
|     "jdk_version": [8, 0, 5, 13] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10997, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu1.8.0_11-8.2.0.1-macosx.tar.gz", | ||||
|     "name": "zulu1.8.0_11-8.2.0.1-macosx.tar.gz", | ||||
|     "zulu_version": [8, 2, 0, 1], | ||||
|     "jdk_version": [8, 0, 11, 12] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10346, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu8.21.0.1-jdk8.0.131-macosx_x64.tar.gz", | ||||
|     "name": "zulu8.21.0.1-jdk8.0.131-macosx_x64.tar.gz", | ||||
|     "zulu_version": [8, 21, 0, 1], | ||||
|     "jdk_version": [8, 0, 131, 11] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10362, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu8.23.0.3-jdk8.0.144-macosx_x64.tar.gz", | ||||
|     "name": "zulu8.23.0.3-jdk8.0.144-macosx_x64.tar.gz", | ||||
|     "zulu_version": [8, 23, 0, 3], | ||||
|     "jdk_version": [8, 0, 144, 1] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10399, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu8.25.0.1-jdk8.0.152-macosx_x64.tar.gz", | ||||
|     "name": "zulu8.25.0.1-jdk8.0.152-macosx_x64.tar.gz", | ||||
|     "zulu_version": [8, 25, 0, 1], | ||||
|     "jdk_version": [8, 0, 152, 16] | ||||
|   }, | ||||
|   { | ||||
|     "id": 11355, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu8.46.0.19-ca-jdk8.0.252-macosx_x64.tar.gz", | ||||
|     "name": "zulu8.46.0.19-ca-jdk8.0.252-macosx_x64.tar.gz", | ||||
|     "zulu_version": [8, 46, 0, 19], | ||||
|     "jdk_version": [8, 0, 252, 14] | ||||
|   }, | ||||
|   { | ||||
|     "id": 11481, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu8.48.0.47-ca-jdk8.0.262-macosx_x64.tar.gz", | ||||
|     "name": "zulu8.48.0.47-ca-jdk8.0.262-macosx_x64.tar.gz", | ||||
|     "zulu_version": [8, 48, 0, 47], | ||||
|     "jdk_version": [8, 0, 262, 17] | ||||
|   }, | ||||
|   { | ||||
|     "id": 11622, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu8.48.0.51-ca-jdk8.0.262-macosx_x64.tar.gz", | ||||
|     "name": "zulu8.48.0.51-ca-jdk8.0.262-macosx_x64.tar.gz", | ||||
|     "zulu_version": [8, 48, 0, 51], | ||||
|     "jdk_version": [8, 0, 262, 19] | ||||
|   }, | ||||
|   { | ||||
|     "id": 11535, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu8.48.0.49-ca-jdk8.0.262-macosx_x64.tar.gz", | ||||
|     "name": "zulu8.48.0.49-ca-jdk8.0.262-macosx_x64.tar.gz", | ||||
|     "zulu_version": [8, 48, 0, 49], | ||||
|     "jdk_version": [8, 0, 262, 18] | ||||
|   }, | ||||
|   { | ||||
|     "id": 12424, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu8.52.0.23-ca-jdk8.0.282-macosx_x64.tar.gz", | ||||
|     "name": "zulu8.52.0.23-ca-jdk8.0.282-macosx_x64.tar.gz", | ||||
|     "zulu_version": [8, 52, 0, 23], | ||||
|     "jdk_version": [8, 0, 282, 8] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10383, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu9.0.0.15-jdk9.0.0-macosx_x64.tar.gz", | ||||
|     "name": "zulu9.0.0.15-jdk9.0.0-macosx_x64.tar.gz", | ||||
|     "zulu_version": [9, 0, 0, 15], | ||||
|     "jdk_version": [9, 0, 0, 0] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10413, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu9.0.1.3-jdk9.0.1-macosx_x64.tar.gz", | ||||
|     "name": "zulu9.0.1.3-jdk9.0.1-macosx_x64.tar.gz", | ||||
|     "zulu_version": [9, 0, 1, 3], | ||||
|     "jdk_version": [9, 0, 1, 0] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10503, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu10.2+3-jdk10.0.1-macosx_x64.tar.gz", | ||||
|     "name": "zulu10.2+3-jdk10.0.1-macosx_x64.tar.gz", | ||||
|     "zulu_version": [10, 2, 3, 0], | ||||
|     "jdk_version": [10, 0, 1, 9] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10541, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu10.3+5-jdk10.0.2-macosx_x64.tar.gz", | ||||
|     "name": "zulu10.3+5-jdk10.0.2-macosx_x64.tar.gz", | ||||
|     "zulu_version": [10, 3, 5, 0], | ||||
|     "jdk_version": [10, 0, 2, 13] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10576, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz", | ||||
|     "name": "zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz", | ||||
|     "zulu_version": [11, 2, 3, 0], | ||||
|     "jdk_version": [11, 0, 1, 13] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10604, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu11.29.3-ca-jdk11.0.2-macosx_x64.tar.gz", | ||||
|     "name": "zulu11.29.3-ca-jdk11.0.2-macosx_x64.tar.gz", | ||||
|     "zulu_version": [11, 29, 3, 0], | ||||
|     "jdk_version": [11, 0, 2, 7] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10687, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu11.31.11-ca-jdk11.0.3-macosx_x64.tar.gz", | ||||
|     "name": "zulu11.31.11-ca-jdk11.0.3-macosx_x64.tar.gz", | ||||
|     "zulu_version": [11, 31, 11, 0], | ||||
|     "jdk_version": [11, 0, 3, 7] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10856, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu11.35.13-ca-jdk11.0.5-macosx_x64.tar.gz", | ||||
|     "name": "zulu11.35.13-ca-jdk11.0.5-macosx_x64.tar.gz", | ||||
|     "zulu_version": [11, 35, 13, 0], | ||||
|     "jdk_version": [11, 0, 5, 10] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10933, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu11.35.15-ca-jdk11.0.5-macosx_x64.tar.gz", | ||||
|     "name": "zulu11.35.15-ca-jdk11.0.5-macosx_x64.tar.gz", | ||||
|     "zulu_version": [11, 35, 15, 0], | ||||
|     "jdk_version": [11, 0, 5, 10] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10933, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu11.35.11-ca-jdk11.0.5-macosx_x64.tar.gz", | ||||
|     "name": "zulu11.35.15-ca-jdk11.0.5-macosx_x64.tar.gz", | ||||
|     "zulu_version": [11, 35, 11, 0], | ||||
|     "jdk_version": [11, 0, 5, 10] | ||||
|   }, | ||||
|   { | ||||
|     "id": 12397, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_x64.tar.gz", | ||||
|     "name": "zulu11.45.27-ca-jdk11.0.10-macosx_x64.tar.gz", | ||||
|     "zulu_version": [11, 45, 27, 0], | ||||
|     "jdk_version": [11, 0, 10, 9] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10667, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu12.1.3-ca-jdk12.0.0-macosx_x64.tar.gz", | ||||
|     "name": "zulu12.1.3-ca-jdk12.0.0-macosx_x64.tar.gz", | ||||
|     "zulu_version": [12, 1, 3, 0], | ||||
|     "jdk_version": [12, 0, 0, 33] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10710, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu12.2.3-ca-jdk12.0.1-macosx_x64.tar.gz", | ||||
|     "name": "zulu12.2.3-ca-jdk12.0.1-macosx_x64.tar.gz", | ||||
|     "zulu_version": [12, 2, 3, 0], | ||||
|     "jdk_version": [12, 0, 1, 12] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10780, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu12.3.11-ca-jdk12.0.2-macosx_x64.tar.gz", | ||||
|     "name": "zulu12.3.11-ca-jdk12.0.2-macosx_x64.tar.gz", | ||||
|     "zulu_version": [12, 3, 11, 0], | ||||
|     "jdk_version": [12, 0, 2, 3] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10846, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu13.27.9-ca-jdk13.0.0-macosx_x64.tar.gz", | ||||
|     "name": "zulu13.27.9-ca-jdk13.0.0-macosx_x64.tar.gz", | ||||
|     "zulu_version": [13, 27, 9, 0], | ||||
|     "jdk_version": [13, 0, 0, 33] | ||||
|   }, | ||||
|   { | ||||
|     "id": 10888, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu13.28.11-ca-jdk13.0.1-macosx_x64.tar.gz", | ||||
|     "name": "zulu13.28.11-ca-jdk13.0.1-macosx_x64.tar.gz", | ||||
|     "zulu_version": [13, 28, 11, 0], | ||||
|     "jdk_version": [13, 0, 1, 10] | ||||
|   }, | ||||
|   { | ||||
|     "id": 11073, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu13.29.9-ca-jdk13.0.2-macosx_x64.tar.gz", | ||||
|     "name": "zulu13.29.9-ca-jdk13.0.2-macosx_x64.tar.gz", | ||||
|     "zulu_version": [13, 29, 9, 0], | ||||
|     "jdk_version": [13, 0, 2, 6] | ||||
|   }, | ||||
|   { | ||||
|     "id": 12408, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu13.37.21-ca-jdk13.0.6-macosx_x64.tar.gz", | ||||
|     "name": "zulu13.37.21-ca-jdk13.0.6-macosx_x64.tar.gz", | ||||
|     "zulu_version": [13, 37, 21, 0], | ||||
|     "jdk_version": [13, 0, 6, 5] | ||||
|   }, | ||||
|   { | ||||
|     "id": 11236, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu14.27.1-ca-jdk14.0.0-macosx_x64.tar.gz", | ||||
|     "name": "zulu14.27.1-ca-jdk14.0.0-macosx_x64.tar.gz", | ||||
|     "zulu_version": [14, 27, 1, 0], | ||||
|     "jdk_version": [14, 0, 0, 36] | ||||
|   }, | ||||
|   { | ||||
|     "id": 11349, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-macosx_x64.tar.gz", | ||||
|     "name": "zulu14.28.21-ca-jdk14.0.1-macosx_x64.tar.gz", | ||||
|     "zulu_version": [14, 28, 21, 0], | ||||
|     "jdk_version": [14, 0, 1, 8] | ||||
|   }, | ||||
|   { | ||||
|     "id": 11513, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu14.29.23-ca-jdk14.0.2-macosx_x64.tar.gz", | ||||
|     "name": "zulu14.29.23-ca-jdk14.0.2-macosx_x64.tar.gz", | ||||
|     "zulu_version": [14, 29, 23, 0], | ||||
|     "jdk_version": [14, 0, 2, 12] | ||||
|   }, | ||||
|   { | ||||
|     "id": 11780, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-macosx_x64.tar.gz", | ||||
|     "name": "zulu15.27.17-ca-jdk15.0.0-macosx_x64.tar.gz", | ||||
|     "zulu_version": [15, 27, 17, 0], | ||||
|     "jdk_version": [15, 0, 0, 36] | ||||
|   }, | ||||
|   { | ||||
|     "id": 11924, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu15.28.13-ca-jdk15.0.1-macosx_x64.tar.gz", | ||||
|     "name": "zulu15.28.13-ca-jdk15.0.1-macosx_x64.tar.gz", | ||||
|     "zulu_version": [15, 28, 13, 0], | ||||
|     "jdk_version": [15, 0, 1, 8] | ||||
|   }, | ||||
|   { | ||||
|     "id": 12101, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu15.28.51-ca-jdk15.0.1-macosx_x64.tar.gz", | ||||
|     "name": "zulu15.28.51-ca-jdk15.0.1-macosx_x64.tar.gz", | ||||
|     "zulu_version": [15, 28, 51, 0], | ||||
|     "jdk_version": [15, 0, 1, 9] | ||||
|   }, | ||||
|   { | ||||
|     "id": 12445, | ||||
|     "url": "https://cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-macosx_x64.tar.gz", | ||||
|     "name": "zulu15.29.15-ca-jdk15.0.2-macosx_x64.tar.gz", | ||||
|     "zulu_version": [15, 29, 15, 0], | ||||
|     "jdk_version": [15, 0, 2, 7] | ||||
|   } | ||||
| ] | ||||
							
								
								
									
										188
									
								
								__tests__/distributors/adopt-installer.test.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										188
									
								
								__tests__/distributors/adopt-installer.test.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,188 @@ | ||||
| import { HttpClient } from '@actions/http-client'; | ||||
|  | ||||
| import { AdoptDistribution, AdoptImplementation } from '../../src/distributions/adopt/installer'; | ||||
| import { JavaInstallerOptions } from '../../src/distributions/base-models'; | ||||
|  | ||||
| let manifestData = require('../data/adopt.json') as []; | ||||
|  | ||||
| describe('getAvailableVersions', () => { | ||||
|   let spyHttpClient: jest.SpyInstance; | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson'); | ||||
|     spyHttpClient.mockReturnValue({ | ||||
|       statusCode: 200, | ||||
|       headers: {}, | ||||
|       result: [] | ||||
|     }); | ||||
|   }); | ||||
|  | ||||
|   afterEach(() => { | ||||
|     jest.resetAllMocks(); | ||||
|     jest.clearAllMocks(); | ||||
|     jest.restoreAllMocks(); | ||||
|   }); | ||||
|  | ||||
|   it.each([ | ||||
|     [ | ||||
|       { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       AdoptImplementation.Hotspot, | ||||
|       'os=mac&architecture=x64&image_type=jdk&release_type=ga&jvm_impl=hotspot&page_size=20&page=0' | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11', architecture: 'x86', packageType: 'jdk', checkLatest: false }, | ||||
|       AdoptImplementation.Hotspot, | ||||
|       'os=mac&architecture=x86&image_type=jdk&release_type=ga&jvm_impl=hotspot&page_size=20&page=0' | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11', architecture: 'x64', packageType: 'jre', checkLatest: false }, | ||||
|       AdoptImplementation.Hotspot, | ||||
|       'os=mac&architecture=x64&image_type=jre&release_type=ga&jvm_impl=hotspot&page_size=20&page=0' | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11-ea', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       AdoptImplementation.Hotspot, | ||||
|       'os=mac&architecture=x64&image_type=jdk&release_type=ea&jvm_impl=hotspot&page_size=20&page=0' | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       AdoptImplementation.OpenJ9, | ||||
|       'os=mac&architecture=x64&image_type=jdk&release_type=ga&jvm_impl=openj9&page_size=20&page=0' | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11', architecture: 'x86', packageType: 'jdk', checkLatest: false }, | ||||
|       AdoptImplementation.OpenJ9, | ||||
|       'os=mac&architecture=x86&image_type=jdk&release_type=ga&jvm_impl=openj9&page_size=20&page=0' | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11', architecture: 'x64', packageType: 'jre', checkLatest: false }, | ||||
|       AdoptImplementation.OpenJ9, | ||||
|       'os=mac&architecture=x64&image_type=jre&release_type=ga&jvm_impl=openj9&page_size=20&page=0' | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11-ea', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       AdoptImplementation.OpenJ9, | ||||
|       'os=mac&architecture=x64&image_type=jdk&release_type=ea&jvm_impl=openj9&page_size=20&page=0' | ||||
|     ] | ||||
|   ])( | ||||
|     'build correct url for %s', | ||||
|     async ( | ||||
|       installerOptions: JavaInstallerOptions, | ||||
|       impl: AdoptImplementation, | ||||
|       expectedParameters | ||||
|     ) => { | ||||
|       const distribution = new AdoptDistribution(installerOptions, impl); | ||||
|       const baseUrl = 'https://api.adoptopenjdk.net/v3/assets/version/%5B1.0,100.0%5D'; | ||||
|       const expectedUrl = `${baseUrl}?project=jdk&vendor=adoptopenjdk&heap_size=normal&sort_method=DEFAULT&sort_order=DESC&${expectedParameters}`; | ||||
|       distribution['getPlatformOption'] = () => 'mac'; | ||||
|  | ||||
|       await distribution['getAvailableVersions'](); | ||||
|  | ||||
|       expect(spyHttpClient.mock.calls).toHaveLength(1); | ||||
|       expect(spyHttpClient.mock.calls[0][0]).toBe(expectedUrl); | ||||
|     } | ||||
|   ); | ||||
|  | ||||
|   it('load available versions', async () => { | ||||
|     spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson'); | ||||
|     spyHttpClient | ||||
|       .mockReturnValueOnce({ | ||||
|         statusCode: 200, | ||||
|         headers: {}, | ||||
|         result: manifestData | ||||
|       }) | ||||
|       .mockReturnValueOnce({ | ||||
|         statusCode: 200, | ||||
|         headers: {}, | ||||
|         result: manifestData | ||||
|       }) | ||||
|       .mockReturnValueOnce({ | ||||
|         statusCode: 200, | ||||
|         headers: {}, | ||||
|         result: [] | ||||
|       }); | ||||
|  | ||||
|     const distribution = new AdoptDistribution( | ||||
|       { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       AdoptImplementation.Hotspot | ||||
|     ); | ||||
|     const availableVersions = await distribution['getAvailableVersions'](); | ||||
|     expect(availableVersions).not.toBeNull(); | ||||
|     expect(availableVersions.length).toBe(manifestData.length * 2); | ||||
|   }); | ||||
|  | ||||
|   it.each([ | ||||
|     [AdoptImplementation.Hotspot, 'jdk', 'Java_Adopt_jdk'], | ||||
|     [AdoptImplementation.Hotspot, 'jre', 'Java_Adopt_jre'], | ||||
|     [AdoptImplementation.OpenJ9, 'jdk', 'Java_Adopt-OpenJ9_jdk'], | ||||
|     [AdoptImplementation.OpenJ9, 'jre', 'Java_Adopt-OpenJ9_jre'] | ||||
|   ])( | ||||
|     'find right toolchain folder', | ||||
|     (impl: AdoptImplementation, packageType: string, expected: string) => { | ||||
|       const distribution = new AdoptDistribution( | ||||
|         { version: '11', architecture: 'x64', packageType: packageType, checkLatest: false }, | ||||
|         impl | ||||
|       ); | ||||
|  | ||||
|       // @ts-ignore - because it is protected | ||||
|       expect(distribution.toolcacheFolderName).toBe(expected); | ||||
|     } | ||||
|   ); | ||||
| }); | ||||
|  | ||||
| describe('findPackageForDownload', () => { | ||||
|   it.each([ | ||||
|     ['9', '9.0.7+10'], | ||||
|     ['15', '15.0.2+7'], | ||||
|     ['15.0', '15.0.2+7'], | ||||
|     ['15.0.2', '15.0.2+7'], | ||||
|     ['15.0.1', '15.0.1+9.1'], | ||||
|     ['11.x', '11.0.10+9'], | ||||
|     ['x', '15.0.2+7'], | ||||
|     ['12', '12.0.2+10.3'], // make sure that '12.0.2+10.1', '12.0.2+10.3', '12.0.2+10.2' are sorted correctly | ||||
|     ['12.0.2+10.1', '12.0.2+10.1'], | ||||
|     ['15.0.1+9', '15.0.1+9'], | ||||
|     ['15.0.1+9.1', '15.0.1+9.1'] | ||||
|   ])('version is resolved correctly %s -> %s', async (input, expected) => { | ||||
|     const distribution = new AdoptDistribution( | ||||
|       { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       AdoptImplementation.Hotspot | ||||
|     ); | ||||
|     distribution['getAvailableVersions'] = async () => manifestData; | ||||
|     const resolvedVersion = await distribution['findPackageForDownload'](input); | ||||
|     expect(resolvedVersion.version).toBe(expected); | ||||
|   }); | ||||
|  | ||||
|   it('version is found but binaries list is empty', async () => { | ||||
|     const distribution = new AdoptDistribution( | ||||
|       { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       AdoptImplementation.Hotspot | ||||
|     ); | ||||
|     distribution['getAvailableVersions'] = async () => manifestData; | ||||
|     await expect(distribution['findPackageForDownload']('9.0.8')).rejects.toThrowError( | ||||
|       /Could not find satisfied version for SemVer */ | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('version is not found', async () => { | ||||
|     const distribution = new AdoptDistribution( | ||||
|       { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       AdoptImplementation.Hotspot | ||||
|     ); | ||||
|     distribution['getAvailableVersions'] = async () => manifestData; | ||||
|     await expect(distribution['findPackageForDownload']('7.x')).rejects.toThrowError( | ||||
|       /Could not find satisfied version for SemVer */ | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('version list is empty', async () => { | ||||
|     const distribution = new AdoptDistribution( | ||||
|       { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       AdoptImplementation.Hotspot | ||||
|     ); | ||||
|     distribution['getAvailableVersions'] = async () => []; | ||||
|     await expect(distribution['findPackageForDownload']('11')).rejects.toThrowError( | ||||
|       /Could not find satisfied version for SemVer */ | ||||
|     ); | ||||
|   }); | ||||
| }); | ||||
							
								
								
									
										351
									
								
								__tests__/distributors/base-installer.test.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										351
									
								
								__tests__/distributors/base-installer.test.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,351 @@ | ||||
| import * as tc from '@actions/tool-cache'; | ||||
| import * as core from '@actions/core'; | ||||
| import * as util from '../../src/util'; | ||||
|  | ||||
| import path from 'path'; | ||||
| import * as semver from 'semver'; | ||||
|  | ||||
| import { JavaBase } from '../../src/distributions/base-installer'; | ||||
| import { | ||||
|   JavaDownloadRelease, | ||||
|   JavaInstallerOptions, | ||||
|   JavaInstallerResults | ||||
| } from '../../src/distributions/base-models'; | ||||
|  | ||||
| class EmptyJavaBase extends JavaBase { | ||||
|   constructor(installerOptions: JavaInstallerOptions) { | ||||
|     super('Empty', installerOptions); | ||||
|   } | ||||
|  | ||||
|   protected async downloadTool(javaRelease: JavaDownloadRelease): Promise<JavaInstallerResults> { | ||||
|     return { | ||||
|       version: '11.0.9', | ||||
|       path: path.join('toolcache', this.toolcacheFolderName, '11.0.9', this.architecture) | ||||
|     }; | ||||
|   } | ||||
|  | ||||
|   protected async findPackageForDownload(range: string): Promise<JavaDownloadRelease> { | ||||
|     const availableVersion = '11.0.9'; | ||||
|     if (!semver.satisfies(availableVersion, range)) { | ||||
|       throw new Error('Available version not found'); | ||||
|     } | ||||
|  | ||||
|     return { | ||||
|       version: availableVersion, | ||||
|       url: `some/random_url/java/${availableVersion}` | ||||
|     }; | ||||
|   } | ||||
| } | ||||
|  | ||||
| describe('findInToolcache', () => { | ||||
|   const actualJavaVersion = '11.0.8'; | ||||
|   const javaPath = path.join('Java_Empty_jdk', actualJavaVersion, 'x64'); | ||||
|  | ||||
|   let mockJavaBase: EmptyJavaBase; | ||||
|   let spyGetToolcachePath: jest.SpyInstance; | ||||
|   let spyTcFindAllVersions: jest.SpyInstance; | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     spyGetToolcachePath = jest.spyOn(util, 'getToolcachePath'); | ||||
|     spyTcFindAllVersions = jest.spyOn(tc, 'findAllVersions'); | ||||
|   }); | ||||
|  | ||||
|   afterEach(() => { | ||||
|     jest.resetAllMocks(); | ||||
|     jest.clearAllMocks(); | ||||
|     jest.restoreAllMocks(); | ||||
|   }); | ||||
|  | ||||
|   it.each([ | ||||
|     [ | ||||
|       { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       { version: actualJavaVersion, path: javaPath } | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11.0', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       { version: actualJavaVersion, path: javaPath } | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11.0.8', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       { version: actualJavaVersion, path: javaPath } | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: true }, | ||||
|       { version: actualJavaVersion, path: javaPath } | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11.0', architecture: 'x64', packageType: 'jdk', checkLatest: true }, | ||||
|       { version: actualJavaVersion, path: javaPath } | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11.0.8', architecture: 'x64', packageType: 'jdk', checkLatest: true }, | ||||
|       { version: actualJavaVersion, path: javaPath } | ||||
|     ], | ||||
|     [{ version: '11', architecture: 'x64', packageType: 'jre', checkLatest: false }, null], | ||||
|     [{ version: '8', architecture: 'x64', packageType: 'jdk', checkLatest: false }, null], | ||||
|     [{ version: '11', architecture: 'x86', packageType: 'jdk', checkLatest: false }, null], | ||||
|     [{ version: '11', architecture: 'x86', packageType: 'jre', checkLatest: false }, null] | ||||
|   ])(`should find java for path %s -> %s`, (input, expected) => { | ||||
|     spyTcFindAllVersions.mockReturnValue([actualJavaVersion]); | ||||
|     spyGetToolcachePath.mockImplementation( | ||||
|       (toolname: string, javaVersion: string, architecture: string) => { | ||||
|         const semverVersion = new semver.Range(javaVersion); | ||||
|  | ||||
|         if (path.basename(javaPath) !== architecture || !javaPath.includes(toolname)) { | ||||
|           return ''; | ||||
|         } | ||||
|  | ||||
|         return semver.satisfies(actualJavaVersion, semverVersion) ? javaPath : ''; | ||||
|       } | ||||
|     ); | ||||
|     mockJavaBase = new EmptyJavaBase(input); | ||||
|     expect(mockJavaBase['findInToolcache']()).toEqual(expected); | ||||
|   }); | ||||
|  | ||||
|   it.each([ | ||||
|     ['11', { version: '11.0.3+2', versionInPath: '11.0.3-2' }], | ||||
|     ['11.0', { version: '11.0.3+2', versionInPath: '11.0.3-2' }], | ||||
|     ['11.0.1', { version: '11.0.1', versionInPath: '11.0.1' }], | ||||
|     ['11.0.3', { version: '11.0.3+2', versionInPath: '11.0.3-2' }], | ||||
|     ['15', { version: '15.0.2+4', versionInPath: '15.0.2-4' }], | ||||
|     ['x', { version: '15.0.2+4', versionInPath: '15.0.2-4' }], | ||||
|     ['x-ea', { version: '17.4.4', versionInPath: '17.4.4-ea' }], | ||||
|     ['11-ea', { version: '11.3.3+5.2.1231421', versionInPath: '11.3.3-ea.5.2.1231421' }], | ||||
|     ['11.2-ea', { version: '11.2.1', versionInPath: '11.2.1-ea' }], | ||||
|     ['11.2.1-ea', { version: '11.2.1', versionInPath: '11.2.1-ea' }] | ||||
|   ])('should choose correct java from tool-cache for input %s', (input, expected) => { | ||||
|     spyTcFindAllVersions.mockReturnValue([ | ||||
|       '17.4.4-ea', | ||||
|       '11.0.2', | ||||
|       '15.0.2-4', | ||||
|       '11.0.3-2', | ||||
|       '11.2.1-ea', | ||||
|       '11.3.2-ea', | ||||
|       '11.3.2-ea.5', | ||||
|       '11.3.3-ea.5.2.1231421', | ||||
|       '12.3.2-0', | ||||
|       '11.0.1' | ||||
|     ]); | ||||
|     spyGetToolcachePath.mockImplementation( | ||||
|       (toolname: string, javaVersion: string, architecture: string) => | ||||
|         `/hostedtoolcache/${toolname}/${javaVersion}/${architecture}` | ||||
|     ); | ||||
|     mockJavaBase = new EmptyJavaBase({ | ||||
|       version: input, | ||||
|       architecture: 'x64', | ||||
|       packageType: 'jdk', | ||||
|       checkLatest: false | ||||
|     }); | ||||
|     const foundVersion = mockJavaBase['findInToolcache'](); | ||||
|     expect(foundVersion).toEqual({ | ||||
|       version: expected.version, | ||||
|       path: `/hostedtoolcache/Java_Empty_jdk/${expected.versionInPath}/x64` | ||||
|     }); | ||||
|   }); | ||||
| }); | ||||
|  | ||||
| describe('setupJava', () => { | ||||
|   const actualJavaVersion = '11.0.9'; | ||||
|   const installedJavaVersion = '11.0.8'; | ||||
|   const javaPath = path.join('Java_Empty_jdk', installedJavaVersion, 'x86'); | ||||
|   const javaPathInstalled = path.join('toolcache', 'Java_Empty_jdk', actualJavaVersion, 'x86'); | ||||
|  | ||||
|   let mockJavaBase: EmptyJavaBase; | ||||
|  | ||||
|   let spyGetToolcachePath: jest.SpyInstance; | ||||
|   let spyTcFindAllVersions: jest.SpyInstance; | ||||
|   let spyCoreDebug: jest.SpyInstance; | ||||
|   let spyCoreInfo: jest.SpyInstance; | ||||
|   let spyCoreExportVariable: jest.SpyInstance; | ||||
|   let spyCoreAddPath: jest.SpyInstance; | ||||
|   let spyCoreSetOutput: jest.SpyInstance; | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     spyGetToolcachePath = jest.spyOn(util, 'getToolcachePath'); | ||||
|     spyGetToolcachePath.mockImplementation( | ||||
|       (toolname: string, javaVersion: string, architecture: string) => { | ||||
|         const semverVersion = new semver.Range(javaVersion); | ||||
|  | ||||
|         if (path.basename(javaPath) !== architecture || !javaPath.includes(toolname)) { | ||||
|           return ''; | ||||
|         } | ||||
|  | ||||
|         return semver.satisfies(installedJavaVersion, semverVersion) ? javaPath : ''; | ||||
|       } | ||||
|     ); | ||||
|  | ||||
|     spyTcFindAllVersions = jest.spyOn(tc, 'findAllVersions'); | ||||
|     spyTcFindAllVersions.mockReturnValue([installedJavaVersion]); | ||||
|  | ||||
|     // Spy on core methods | ||||
|     spyCoreDebug = jest.spyOn(core, 'debug'); | ||||
|     spyCoreDebug.mockImplementation(() => undefined); | ||||
|  | ||||
|     spyCoreInfo = jest.spyOn(core, 'info'); | ||||
|     spyCoreInfo.mockImplementation(() => undefined); | ||||
|  | ||||
|     spyCoreAddPath = jest.spyOn(core, 'addPath'); | ||||
|     spyCoreAddPath.mockImplementation(() => undefined); | ||||
|  | ||||
|     spyCoreExportVariable = jest.spyOn(core, 'exportVariable'); | ||||
|     spyCoreExportVariable.mockImplementation(() => undefined); | ||||
|  | ||||
|     spyCoreSetOutput = jest.spyOn(core, 'setOutput'); | ||||
|     spyCoreSetOutput.mockImplementation(() => undefined); | ||||
|   }); | ||||
|  | ||||
|   afterEach(() => { | ||||
|     jest.resetAllMocks(); | ||||
|     jest.clearAllMocks(); | ||||
|     jest.restoreAllMocks(); | ||||
|   }); | ||||
|  | ||||
|   it.each([ | ||||
|     [ | ||||
|       { version: '11', architecture: 'x86', packageType: 'jdk', checkLatest: false }, | ||||
|       { version: installedJavaVersion, path: javaPath } | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11.0', architecture: 'x86', packageType: 'jdk', checkLatest: false }, | ||||
|       { version: installedJavaVersion, path: javaPath } | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11.0.8', architecture: 'x86', packageType: 'jdk', checkLatest: false }, | ||||
|       { version: installedJavaVersion, path: javaPath } | ||||
|     ] | ||||
|   ])('should find java locally for %s', (input, expected) => { | ||||
|     mockJavaBase = new EmptyJavaBase(input); | ||||
|     expect(mockJavaBase.setupJava()).resolves.toEqual(expected); | ||||
|     expect(spyGetToolcachePath).toHaveBeenCalled(); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith(`Resolved Java ${expected.version} from tool-cache`); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith(`Setting Java ${expected.version} as the default`); | ||||
|     expect(spyCoreInfo).not.toHaveBeenCalledWith( | ||||
|       'Trying to resolve the latest version from remote' | ||||
|     ); | ||||
|     expect(spyCoreInfo).not.toHaveBeenCalledWith('Trying to download...'); | ||||
|   }); | ||||
|  | ||||
|   it.each([ | ||||
|     [ | ||||
|       { version: '11', architecture: 'x86', packageType: 'jre', checkLatest: false }, | ||||
|       { path: path.join('toolcache', 'Java_Empty_jre', '11.0.9', 'x86'), version: '11.0.9' } | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       { path: path.join('toolcache', 'Java_Empty_jdk', '11.0.9', 'x64'), version: '11.0.9' } | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11', architecture: 'x64', packageType: 'jre', checkLatest: false }, | ||||
|       { path: path.join('toolcache', 'Java_Empty_jre', '11.0.9', 'x64'), version: '11.0.9' } | ||||
|     ] | ||||
|   ])('download java with configuration %s', async (input, expected) => { | ||||
|     mockJavaBase = new EmptyJavaBase(input); | ||||
|     await expect(mockJavaBase.setupJava()).resolves.toEqual(expected); | ||||
|     expect(spyGetToolcachePath).toHaveBeenCalled(); | ||||
|     expect(spyCoreAddPath).toHaveBeenCalled(); | ||||
|     expect(spyCoreExportVariable).toHaveBeenCalled(); | ||||
|     expect(spyCoreSetOutput).toHaveBeenCalled(); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith('Trying to resolve the latest version from remote'); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith(`Resolved latest version as ${expected.version}`); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith('Trying to download...'); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith(`Java ${expected.version} was downloaded`); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith(`Setting Java ${expected.version} as the default`); | ||||
|   }); | ||||
|  | ||||
|   it.each([ | ||||
|     [ | ||||
|       { version: '11.0.9', architecture: 'x86', packageType: 'jdk', checkLatest: true }, | ||||
|       { version: '11.0.9', path: javaPathInstalled } | ||||
|     ] | ||||
|   ])('should check the latest java version for %s and resolve locally', async (input, expected) => { | ||||
|     mockJavaBase = new EmptyJavaBase(input); | ||||
|     mockJavaBase['findInToolcache'] = () => ({ version: '11.0.9', path: expected.path }); | ||||
|     await expect(mockJavaBase.setupJava()).resolves.toEqual(expected); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith('Trying to resolve the latest version from remote'); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith(`Resolved latest version as ${expected.version}`); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith(`Resolved Java ${expected.version} from tool-cache`); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith(`Setting Java ${expected.version} as the default`); | ||||
|   }); | ||||
|  | ||||
|   it.each([ | ||||
|     [ | ||||
|       { version: '11', architecture: 'x86', packageType: 'jdk', checkLatest: true }, | ||||
|       { version: actualJavaVersion, path: javaPathInstalled } | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11.0', architecture: 'x86', packageType: 'jdk', checkLatest: true }, | ||||
|       { version: actualJavaVersion, path: javaPathInstalled } | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11.0.x', architecture: 'x86', packageType: 'jdk', checkLatest: true }, | ||||
|       { version: actualJavaVersion, path: javaPathInstalled } | ||||
|     ] | ||||
|   ])('should check the latest java version for %s and download', async (input, expected) => { | ||||
|     mockJavaBase = new EmptyJavaBase(input); | ||||
|     await expect(mockJavaBase.setupJava()).resolves.toEqual(expected); | ||||
|     expect(spyGetToolcachePath).toHaveBeenCalled(); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith('Trying to resolve the latest version from remote'); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith(`Resolved latest version as ${actualJavaVersion}`); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith('Trying to download...'); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith(`Java ${actualJavaVersion} was downloaded`); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith(`Setting Java ${expected.version} as the default`); | ||||
|   }); | ||||
|  | ||||
|   it.each([ | ||||
|     [{ version: '15', architecture: 'x86', packageType: 'jre', checkLatest: false }], | ||||
|     [{ version: '11.0.7', architecture: 'x64', packageType: 'jre', checkLatest: false }] | ||||
|   ])('should throw an error for Available version not found for %s', async input => { | ||||
|     mockJavaBase = new EmptyJavaBase(input); | ||||
|     await expect(mockJavaBase.setupJava()).rejects.toThrowError('Available version not found'); | ||||
|     expect(spyTcFindAllVersions).toHaveBeenCalled(); | ||||
|     expect(spyCoreAddPath).not.toHaveBeenCalled(); | ||||
|     expect(spyCoreExportVariable).not.toHaveBeenCalled(); | ||||
|     expect(spyCoreSetOutput).not.toHaveBeenCalled(); | ||||
|   }); | ||||
| }); | ||||
|  | ||||
| describe('normalizeVersion', () => { | ||||
|   const DummyJavaBase = JavaBase as any; | ||||
|  | ||||
|   it.each([ | ||||
|     ['11', { version: '11', stable: true }], | ||||
|     ['11.0', { version: '11.0', stable: true }], | ||||
|     ['11.0.10', { version: '11.0.10', stable: true }], | ||||
|     ['11-ea', { version: '11', stable: false }], | ||||
|     ['11.0.2-ea', { version: '11.0.2', stable: false }] | ||||
|   ])('normalizeVersion from %s to %s', (input, expected) => { | ||||
|     expect(DummyJavaBase.prototype.normalizeVersion.call(null, input)).toEqual(expected); | ||||
|   }); | ||||
|  | ||||
|   it('normalizeVersion should throw an error for non semver', () => { | ||||
|     const version = '11g'; | ||||
|     expect(DummyJavaBase.prototype.normalizeVersion.bind(null, version)).toThrowError( | ||||
|       `The string '${version}' is not valid SemVer notation for a Java version. Please check README file for code snippets and more detailed information` | ||||
|     ); | ||||
|   }); | ||||
| }); | ||||
|  | ||||
| describe('getToolcacheVersionName', () => { | ||||
|   const DummyJavaBase = JavaBase as any; | ||||
|  | ||||
|   it.each([ | ||||
|     [{ version: '11', stable: true }, '11'], | ||||
|     [{ version: '11.0.2', stable: true }, '11.0.2'], | ||||
|     [{ version: '11.0.2+4', stable: true }, '11.0.2-4'], | ||||
|     [{ version: '11.0.2+4.1.2563234', stable: true }, '11.0.2-4.1.2563234'], | ||||
|     [{ version: '11.0', stable: false }, '11.0-ea'], | ||||
|     [{ version: '11.0.3', stable: false }, '11.0.3-ea'], | ||||
|     [{ version: '11.0.3+4', stable: false }, '11.0.3-ea.4'], | ||||
|     [{ version: '11.0.3+4.2.256', stable: false }, '11.0.3-ea.4.2.256'] | ||||
|   ])('returns correct version name for %s', (input, expected) => { | ||||
|     const inputVersion = input.stable ? '11' : '11-ea'; | ||||
|     const mockJavaBase = new EmptyJavaBase({ | ||||
|       version: inputVersion, | ||||
|       packageType: 'jdk', | ||||
|       architecture: 'x64', | ||||
|       checkLatest: false | ||||
|     }); | ||||
|     const actual = mockJavaBase['getToolcacheVersionName'](input.version); | ||||
|     expect(actual).toBe(expected); | ||||
|   }); | ||||
| }); | ||||
							
								
								
									
										235
									
								
								__tests__/distributors/local-installer.test.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										235
									
								
								__tests__/distributors/local-installer.test.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,235 @@ | ||||
| import fs from 'fs'; | ||||
|  | ||||
| import * as tc from '@actions/tool-cache'; | ||||
| import * as core from '@actions/core'; | ||||
|  | ||||
| import path from 'path'; | ||||
| import * as semver from 'semver'; | ||||
| import * as util from '../../src/util'; | ||||
|  | ||||
| import { LocalDistribution } from '../../src/distributions/local/installer'; | ||||
|  | ||||
| describe('setupJava', () => { | ||||
|   const actualJavaVersion = '11.1.10'; | ||||
|   const javaPath = path.join('Java_jdkfile_jdk', actualJavaVersion, 'x86'); | ||||
|  | ||||
|   let mockJavaBase: LocalDistribution; | ||||
|  | ||||
|   let spyGetToolcachePath: jest.SpyInstance; | ||||
|   let spyTcCacheDir: jest.SpyInstance; | ||||
|   let spyTcFindAllVersions: jest.SpyInstance; | ||||
|   let spyCoreDebug: jest.SpyInstance; | ||||
|   let spyCoreInfo: jest.SpyInstance; | ||||
|   let spyCoreExportVariable: jest.SpyInstance; | ||||
|   let spyCoreAddPath: jest.SpyInstance; | ||||
|   let spyCoreSetOutput: jest.SpyInstance; | ||||
|   let spyFsStat: jest.SpyInstance; | ||||
|   let spyFsReadDir: jest.SpyInstance; | ||||
|   let spyUtilsExtractJdkFile: jest.SpyInstance; | ||||
|   let spyPathResolve: jest.SpyInstance; | ||||
|   let expectedJdkFile = 'JavaLocalJdkFile'; | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     spyGetToolcachePath = jest.spyOn(util, 'getToolcachePath'); | ||||
|     spyGetToolcachePath.mockImplementation( | ||||
|       (toolname: string, javaVersion: string, architecture: string) => { | ||||
|         const semverVersion = new semver.Range(javaVersion); | ||||
|  | ||||
|         if (path.basename(javaPath) !== architecture || !javaPath.includes(toolname)) { | ||||
|           return ''; | ||||
|         } | ||||
|  | ||||
|         return semver.satisfies(actualJavaVersion, semverVersion) ? javaPath : ''; | ||||
|       } | ||||
|     ); | ||||
|  | ||||
|     spyTcCacheDir = jest.spyOn(tc, 'cacheDir'); | ||||
|     spyTcCacheDir.mockImplementation( | ||||
|       (archivePath: string, toolcacheFolderName: string, version: string, architecture: string) => | ||||
|         path.join(toolcacheFolderName, version, architecture) | ||||
|     ); | ||||
|  | ||||
|     spyTcFindAllVersions = jest.spyOn(tc, 'findAllVersions'); | ||||
|     spyTcFindAllVersions.mockReturnValue([actualJavaVersion]); | ||||
|  | ||||
|     // Spy on core methods | ||||
|     spyCoreDebug = jest.spyOn(core, 'debug'); | ||||
|     spyCoreDebug.mockImplementation(() => undefined); | ||||
|  | ||||
|     spyCoreInfo = jest.spyOn(core, 'info'); | ||||
|     spyCoreInfo.mockImplementation(() => undefined); | ||||
|  | ||||
|     spyCoreAddPath = jest.spyOn(core, 'addPath'); | ||||
|     spyCoreAddPath.mockImplementation(() => undefined); | ||||
|  | ||||
|     spyCoreExportVariable = jest.spyOn(core, 'exportVariable'); | ||||
|     spyCoreExportVariable.mockImplementation(() => undefined); | ||||
|  | ||||
|     spyCoreSetOutput = jest.spyOn(core, 'setOutput'); | ||||
|     spyCoreSetOutput.mockImplementation(() => undefined); | ||||
|  | ||||
|     // Spy on fs methods | ||||
|     spyFsReadDir = jest.spyOn(fs, 'readdirSync'); | ||||
|     spyFsReadDir.mockImplementation(() => ['JavaTest']); | ||||
|  | ||||
|     spyFsStat = jest.spyOn(fs, 'statSync'); | ||||
|     spyFsStat.mockImplementation((file: string) => { | ||||
|       return { isFile: () => file === expectedJdkFile }; | ||||
|     }); | ||||
|  | ||||
|     // Spy on util methods | ||||
|     spyUtilsExtractJdkFile = jest.spyOn(util, 'extractJdkFile'); | ||||
|     spyUtilsExtractJdkFile.mockImplementation(() => 'some/random/path/'); | ||||
|  | ||||
|     // Spy on path methods | ||||
|     spyPathResolve = jest.spyOn(path, 'resolve'); | ||||
|     spyPathResolve.mockImplementation((path: string) => path); | ||||
|   }); | ||||
|  | ||||
|   afterEach(() => { | ||||
|     jest.resetAllMocks(); | ||||
|     jest.clearAllMocks(); | ||||
|     jest.restoreAllMocks(); | ||||
|   }); | ||||
|  | ||||
|   it('java is resolved from toolcache, jdkfile is untouched', async () => { | ||||
|     const inputs = { | ||||
|       version: actualJavaVersion, | ||||
|       architecture: 'x86', | ||||
|       packageType: 'jdk', | ||||
|       checkLatest: false | ||||
|     }; | ||||
|     const jdkFile = 'not_existing_one'; | ||||
|     const expected = { | ||||
|       version: actualJavaVersion, | ||||
|       path: path.join('Java_jdkfile_jdk', inputs.version, inputs.architecture) | ||||
|     }; | ||||
|  | ||||
|     mockJavaBase = new LocalDistribution(inputs, jdkFile); | ||||
|     await expect(mockJavaBase.setupJava()).resolves.toEqual(expected); | ||||
|     expect(spyGetToolcachePath).toHaveBeenCalled(); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith(`Resolved Java ${actualJavaVersion} from tool-cache`); | ||||
|     expect(spyCoreInfo).not.toHaveBeenCalledWith( | ||||
|       `Java ${inputs.version} was not found in tool-cache. Trying to unpack JDK file...` | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it("java is resolved from toolcache, jdkfile doesn't exist", async () => { | ||||
|     const inputs = { | ||||
|       version: actualJavaVersion, | ||||
|       architecture: 'x86', | ||||
|       packageType: 'jdk', | ||||
|       checkLatest: false | ||||
|     }; | ||||
|     const jdkFile = undefined; | ||||
|     const expected = { | ||||
|       version: actualJavaVersion, | ||||
|       path: path.join('Java_jdkfile_jdk', inputs.version, inputs.architecture) | ||||
|     }; | ||||
|  | ||||
|     mockJavaBase = new LocalDistribution(inputs, jdkFile); | ||||
|     await expect(mockJavaBase.setupJava()).resolves.toEqual(expected); | ||||
|     expect(spyGetToolcachePath).toHaveBeenCalled(); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith(`Resolved Java ${actualJavaVersion} from tool-cache`); | ||||
|     expect(spyCoreInfo).not.toHaveBeenCalledWith( | ||||
|       `Java ${inputs.version} was not found in tool-cache. Trying to unpack JDK file...` | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('java is unpacked from jdkfile', async () => { | ||||
|     const inputs = { | ||||
|       version: '11.0.289', | ||||
|       architecture: 'x86', | ||||
|       packageType: 'jdk', | ||||
|       checkLatest: false | ||||
|     }; | ||||
|     const jdkFile = expectedJdkFile; | ||||
|     const expected = { | ||||
|       version: '11.0.289', | ||||
|       path: path.join('Java_jdkfile_jdk', inputs.version, inputs.architecture) | ||||
|     }; | ||||
|  | ||||
|     mockJavaBase = new LocalDistribution(inputs, jdkFile); | ||||
|     await expect(mockJavaBase.setupJava()).resolves.toEqual(expected); | ||||
|     expect(spyTcFindAllVersions).toHaveBeenCalled(); | ||||
|     expect(spyCoreInfo).not.toHaveBeenCalledWith( | ||||
|       `Resolved Java ${actualJavaVersion} from tool-cache` | ||||
|     ); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith(`Extracting Java from '${jdkFile}'`); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith( | ||||
|       `Java ${inputs.version} was not found in tool-cache. Trying to unpack JDK file...` | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('jdk file is not found', async () => { | ||||
|     const inputs = { | ||||
|       version: '11.0.289', | ||||
|       architecture: 'x86', | ||||
|       packageType: 'jdk', | ||||
|       checkLatest: false | ||||
|     }; | ||||
|     const jdkFile = 'not_existing_one'; | ||||
|     const expected = { | ||||
|       javaVersion: '11.0.289', | ||||
|       javaPath: path.join('Java_jdkfile_jdk', inputs.version, inputs.architecture) | ||||
|     }; | ||||
|  | ||||
|     mockJavaBase = new LocalDistribution(inputs, jdkFile); | ||||
|     expected.javaPath = path.join('Java_jdkfile_jdk', inputs.version, inputs.architecture); | ||||
|     await expect(mockJavaBase.setupJava()).rejects.toThrowError( | ||||
|       "JDK file was not found in path 'not_existing_one'" | ||||
|     ); | ||||
|     expect(spyTcFindAllVersions).toHaveBeenCalled(); | ||||
|     expect(spyCoreInfo).not.toHaveBeenCalledWith( | ||||
|       `Resolved Java ${actualJavaVersion} from tool-cache` | ||||
|     ); | ||||
|     expect(spyCoreInfo).not.toHaveBeenCalledWith(`Extracting Java from '${jdkFile}'`); | ||||
|     expect(spyCoreInfo).toHaveBeenCalledWith( | ||||
|       `Java ${inputs.version} was not found in tool-cache. Trying to unpack JDK file...` | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it.each([ | ||||
|     [ | ||||
|       { version: '8.0.289', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       'otherJdkFile' | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11.0.289', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       'otherJdkFile' | ||||
|     ], | ||||
|     [ | ||||
|       { version: '12.0.289', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       'otherJdkFile' | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11.1.11', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       'not_existing_one' | ||||
|     ] | ||||
|   ])( | ||||
|     `Throw an error if jdkfile has wrong path, inputs %s, jdkfile %s, real name ${expectedJdkFile}`, | ||||
|     async (inputs, jdkFile) => { | ||||
|       mockJavaBase = new LocalDistribution(inputs, jdkFile); | ||||
|       await expect(mockJavaBase.setupJava()).rejects.toThrowError( | ||||
|         /JDK file was not found in path */ | ||||
|       ); | ||||
|       expect(spyTcFindAllVersions).toHaveBeenCalled(); | ||||
|     } | ||||
|   ); | ||||
|  | ||||
|   it.each([ | ||||
|     [{ version: '8.0.289', architecture: 'x64', packageType: 'jdk', checkLatest: false }, ''], | ||||
|     [ | ||||
|       { version: '7.0.289', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       undefined | ||||
|     ], | ||||
|     [ | ||||
|       { version: '11.0.289', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       undefined | ||||
|     ] | ||||
|   ])('Throw an error if jdkfile is not specified, inputs %s', async (inputs, jdkFile) => { | ||||
|     mockJavaBase = new LocalDistribution(inputs, jdkFile); | ||||
|     await expect(mockJavaBase.setupJava()).rejects.toThrowError("'jdkFile' is not specified"); | ||||
|     expect(spyTcFindAllVersions).toHaveBeenCalled(); | ||||
|   }); | ||||
| }); | ||||
							
								
								
									
										164
									
								
								__tests__/distributors/temurin-installer.test.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										164
									
								
								__tests__/distributors/temurin-installer.test.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,164 @@ | ||||
| import { HttpClient } from '@actions/http-client'; | ||||
|  | ||||
| import { | ||||
|   TemurinDistribution, | ||||
|   TemurinImplementation | ||||
| } from '../../src/distributions/temurin/installer'; | ||||
| import { JavaInstallerOptions } from '../../src/distributions/base-models'; | ||||
|  | ||||
| let manifestData = require('../data/temurin.json') as []; | ||||
|  | ||||
| describe('getAvailableVersions', () => { | ||||
|   let spyHttpClient: jest.SpyInstance; | ||||
|  | ||||
|   beforeEach(() => { | ||||
|     spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson'); | ||||
|     spyHttpClient.mockReturnValue({ | ||||
|       statusCode: 200, | ||||
|       headers: {}, | ||||
|       result: [] | ||||
|     }); | ||||
|   }); | ||||
|  | ||||
|   afterEach(() => { | ||||
|     jest.resetAllMocks(); | ||||
|     jest.clearAllMocks(); | ||||
|     jest.restoreAllMocks(); | ||||
|   }); | ||||
|  | ||||
|   it.each([ | ||||
|     [ | ||||
|       { version: '16', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       TemurinImplementation.Hotspot, | ||||
|       'os=mac&architecture=x64&image_type=jdk&release_type=ga&jvm_impl=hotspot&page_size=20&page=0' | ||||
|     ], | ||||
|     [ | ||||
|       { version: '16', architecture: 'x86', packageType: 'jdk', checkLatest: false }, | ||||
|       TemurinImplementation.Hotspot, | ||||
|       'os=mac&architecture=x86&image_type=jdk&release_type=ga&jvm_impl=hotspot&page_size=20&page=0' | ||||
|     ], | ||||
|     [ | ||||
|       { version: '16', architecture: 'x64', packageType: 'jre', checkLatest: false }, | ||||
|       TemurinImplementation.Hotspot, | ||||
|       'os=mac&architecture=x64&image_type=jre&release_type=ga&jvm_impl=hotspot&page_size=20&page=0' | ||||
|     ], | ||||
|     [ | ||||
|       { version: '16-ea', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       TemurinImplementation.Hotspot, | ||||
|       'os=mac&architecture=x64&image_type=jdk&release_type=ea&jvm_impl=hotspot&page_size=20&page=0' | ||||
|     ] | ||||
|   ])( | ||||
|     'build correct url for %s', | ||||
|     async ( | ||||
|       installerOptions: JavaInstallerOptions, | ||||
|       impl: TemurinImplementation, | ||||
|       expectedParameters | ||||
|     ) => { | ||||
|       const distribution = new TemurinDistribution(installerOptions, impl); | ||||
|       const baseUrl = 'https://api.adoptium.net/v3/assets/version/%5B1.0,100.0%5D'; | ||||
|       const expectedUrl = `${baseUrl}?project=jdk&vendor=adoptium&heap_size=normal&sort_method=DEFAULT&sort_order=DESC&${expectedParameters}`; | ||||
|       distribution['getPlatformOption'] = () => 'mac'; | ||||
|  | ||||
|       await distribution['getAvailableVersions'](); | ||||
|  | ||||
|       expect(spyHttpClient.mock.calls).toHaveLength(1); | ||||
|       expect(spyHttpClient.mock.calls[0][0]).toBe(expectedUrl); | ||||
|     } | ||||
|   ); | ||||
|  | ||||
|   it('load available versions', async () => { | ||||
|     spyHttpClient = jest.spyOn(HttpClient.prototype, 'getJson'); | ||||
|     spyHttpClient | ||||
|       .mockReturnValueOnce({ | ||||
|         statusCode: 200, | ||||
|         headers: {}, | ||||
|         result: manifestData | ||||
|       }) | ||||
|       .mockReturnValueOnce({ | ||||
|         statusCode: 200, | ||||
|         headers: {}, | ||||
|         result: manifestData | ||||
|       }) | ||||
|       .mockReturnValueOnce({ | ||||
|         statusCode: 200, | ||||
|         headers: {}, | ||||
|         result: [] | ||||
|       }); | ||||
|  | ||||
|     const distribution = new TemurinDistribution( | ||||
|       { version: '8', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       TemurinImplementation.Hotspot | ||||
|     ); | ||||
|     const availableVersions = await distribution['getAvailableVersions'](); | ||||
|     expect(availableVersions).not.toBeNull(); | ||||
|     expect(availableVersions.length).toBe(manifestData.length * 2); | ||||
|   }); | ||||
|  | ||||
|   it.each([ | ||||
|     [TemurinImplementation.Hotspot, 'jdk', 'Java_Temurin-Hotspot_jdk'], | ||||
|     [TemurinImplementation.Hotspot, 'jre', 'Java_Temurin-Hotspot_jre'] | ||||
|   ])( | ||||
|     'find right toolchain folder', | ||||
|     (impl: TemurinImplementation, packageType: string, expected: string) => { | ||||
|       const distribution = new TemurinDistribution( | ||||
|         { version: '8', architecture: 'x64', packageType: packageType, checkLatest: false }, | ||||
|         impl | ||||
|       ); | ||||
|  | ||||
|       // @ts-ignore - because it is protected | ||||
|       expect(distribution.toolcacheFolderName).toBe(expected); | ||||
|     } | ||||
|   ); | ||||
| }); | ||||
|  | ||||
| describe('findPackageForDownload', () => { | ||||
|   it.each([ | ||||
|     ['8', '8.0.302+8'], | ||||
|     ['16', '16.0.2+7'], | ||||
|     ['16.0', '16.0.2+7'], | ||||
|     ['16.0.2', '16.0.2+7'], | ||||
|     ['8.x', '8.0.302+8'], | ||||
|     ['x', '16.0.2+7'] | ||||
|   ])('version is resolved correctly %s -> %s', async (input, expected) => { | ||||
|     const distribution = new TemurinDistribution( | ||||
|       { version: '8', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       TemurinImplementation.Hotspot | ||||
|     ); | ||||
|     distribution['getAvailableVersions'] = async () => manifestData; | ||||
|     const resolvedVersion = await distribution['findPackageForDownload'](input); | ||||
|     expect(resolvedVersion.version).toBe(expected); | ||||
|   }); | ||||
|  | ||||
|   it('version is found but binaries list is empty', async () => { | ||||
|     const distribution = new TemurinDistribution( | ||||
|       { version: '9.0.8', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       TemurinImplementation.Hotspot | ||||
|     ); | ||||
|     distribution['getAvailableVersions'] = async () => manifestData; | ||||
|     await expect(distribution['findPackageForDownload']('9.0.8')).rejects.toThrowError( | ||||
|       /Could not find satisfied version for SemVer */ | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('version is not found', async () => { | ||||
|     const distribution = new TemurinDistribution( | ||||
|       { version: '7.x', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       TemurinImplementation.Hotspot | ||||
|     ); | ||||
|     distribution['getAvailableVersions'] = async () => manifestData; | ||||
|     await expect(distribution['findPackageForDownload']('7.x')).rejects.toThrowError( | ||||
|       /Could not find satisfied version for SemVer */ | ||||
|     ); | ||||
|   }); | ||||
|  | ||||
|   it('version list is empty', async () => { | ||||
|     const distribution = new TemurinDistribution( | ||||
|       { version: '8', architecture: 'x64', packageType: 'jdk', checkLatest: false }, | ||||
|       TemurinImplementation.Hotspot | ||||
|     ); | ||||
|     distribution['getAvailableVersions'] = async () => []; | ||||
|     await expect(distribution['findPackageForDownload']('8')).rejects.toThrowError( | ||||
|       /Could not find satisfied version for SemVer */ | ||||
|     ); | ||||
|   }); | ||||
| }); | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user
	