-
Notifications
You must be signed in to change notification settings - Fork 0
Test older versions of GraalVM CE on Windows Server 2025 #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
a9000f7
to
ac4c76e
Compare
d41b7fc
to
7fe530e
Compare
name: NativeTest - ${{ matrix.graalvm-distribution }} for JDK ${{ matrix.java }} on ${{ matrix.os }} | ||
if: github.repository == 'linghengqian/hive-server2-jdbc-driver' | ||
strategy: | ||
matrix: | ||
java: [ '24.2.2' ] | ||
os: [ 'windows-2025' ] | ||
graalvm-distribution: [ 'mandrel' ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Rancher Desktop without GUI on Windows Server | ||
run: | | ||
./subprojects/doc/helpful_tools/uninstall-docker-engine-for-wcow.ps1 | ||
winget install --id jazzdelightsme.WingetPathUpdater --source winget | ||
winget install --id SUSE.RancherDesktop --source winget | ||
rdctl start --application.start-in-background --container-engine.name=moby --kubernetes.enabled=false | ||
./subprojects/doc/helpful_tools/wait-for-rancher-desktop-backend.ps1 | ||
"PATH=$env:PATH" >> $env:GITHUB_ENV | ||
- uses: graalvm/setup-graalvm@v1 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: ${{ matrix.graalvm-distribution }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
cache: 'maven' | ||
native-image-job-reports: 'true' | ||
- name: NativeTest on ${{ matrix.os }} | ||
run: ./mvnw -PnativeTestInJava23+ clean test | ||
native-test-ci-on-liberica: |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 days ago
To fix this issue, add an explicit permissions
block to your workflow so that all jobs limit their access to the GITHUB_TOKEN according to the principle of least privilege. Since none of the jobs in your workflow appear to require write permissions (they run code checks and tests, do checkouts, and set up environments), the minimal recommended setting is contents: read
. This can be added at the top level (applies to all jobs unless overridden), or individually per job if some jobs need additional permissions. The fix is best performed by editing .github/workflows/test.yml
by adding the following block after the name
section and before the on:
section:
permissions:
contents: read
No other changes or imports are necessary.
-
Copy modified lines R16-R17
@@ -13,6 +13,8 @@ | ||
# limitations under the License. | ||
|
||
name: Test | ||
permissions: | ||
contents: read | ||
on: | ||
pull_request: | ||
branches: |
47c9806
to
0d2a65e
Compare
0d2a65e
to
9432209
Compare
.github/workflows/test.yml
Outdated
os: [ 'windows-2025' ] | ||
graalvm-distribution: [ 'liberica' ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Rancher Desktop without GUI on Windows Server | ||
run: | | ||
iwr -Uri "https://raw.githubusercontent.com/microsoft/Windows-Containers/refs/heads/Main/helpful_tools/Install-DockerCE/uninstall-docker-ce.ps1" -OutFile uninstall-docker-ce.ps1 | ||
.\uninstall-docker-ce.ps1 -Force | ||
ri .\uninstall-docker-ce.ps1 | ||
winget install --id jazzdelightsme.WingetPathUpdater --source winget | ||
winget install --id SUSE.RancherDesktop --source winget | ||
rdctl start --application.start-in-background --container-engine.name=moby --kubernetes.enabled=false | ||
./subprojects/doc/helpful_tools/wait-for-rancher-desktop-backend.ps1 | ||
"PATH=$env:PATH" >> $env:GITHUB_ENV | ||
- uses: graalvm/setup-graalvm@v1 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: ${{ matrix.graalvm-distribution }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
cache: 'maven' | ||
native-image-job-reports: 'true' | ||
- name: NativeTest on ${{ matrix.os }} | ||
run: ./mvnw -PnativeTestInJava23+ clean test | ||
native-test-ci-on-oracle-graalvm: | ||
name: NativeTest - ${{ matrix.graalvm-distribution }} for JDK ${{ matrix.java }} on ${{ matrix.os }} | ||
if: github.repository == 'linghengqian/hive-server2-jdbc-driver' | ||
strategy: | ||
matrix: | ||
java: [ '24.0.2' ] |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 days ago
To fix the issue, you should add an explicit permissions:
block to your workflow or directly to the job shown (starting at line 116 for "native-test-ci-on-liberica"). Since most CI/test jobs typically require only the ability to read repository contents (not write), you can add a minimal permissions:
entry specifying contents: read
either at the top (root) level or for each job individually.
- General fix: Add
permissions:
at the root of the workflow (abovejobs:
) if all jobs require the same reduced permissions, or add an explicit block to each job if different jobs need different permissions. - Best approach here: Insert the following near line 15 (above or below
name: Test
):This applies to all jobs unless a job sets its own permissions.permissions: contents: read
- If only specific jobs need the block: Add it inside the relevant job.
- For the error specifically highlighted at line 116, you can add:
directly after the
permissions: contents: read
name:
field in thenative-test-ci-on-liberica
job.
Files/regions to change:
You can add a root-level permissions:
block, or a per-job block inside the affected job (native-test-ci-on-liberica
). Prefer root-level unless exceptions are needed.
Methods/imports/definitions:
No dependencies or imports required; purely a YAML field addition.
-
Copy modified lines R16-R17
@@ -13,6 +13,8 @@ | ||
# limitations under the License. | ||
|
||
name: Test | ||
permissions: | ||
contents: read | ||
on: | ||
pull_request: | ||
branches: |
168642c
to
3a259e9
Compare
3a259e9
to
4e41869
Compare
Uh oh!
There was an error while loading. Please reload this page.