Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/__build-mode-autobuild.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions pr-checks/checks/build-mode-autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: "An end-to-end integration test of a Java repository built using 'b
operatingSystems: ["ubuntu", "windows"]
versions: ["linked", "nightly-latest"]
installJava: "true"
installYq: "true"
steps:
- name: Set up Java test repo configuration
run: |
Expand All @@ -18,11 +19,6 @@ steps:
languages: java
tools: ${{ steps.prepare-test.outputs.tools-url }}

- name: Install yq
if: runner.os == 'Windows'
run: |
choco install yq -y

- name: Validate database build mode
run: |
metadata_path="$RUNNER_TEMP/customDbLocation/java/codeql-database.yml"
Expand Down
17 changes: 16 additions & 1 deletion pr-checks/sync.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

import ruamel.yaml
from ruamel.yaml.scalarstring import SingleQuotedScalarString
from ruamel.yaml.scalarstring import SingleQuotedScalarString, LiteralScalarString
import pathlib
import os

Expand Down Expand Up @@ -223,6 +223,21 @@ def writeHeader(checkStream):
}
})

installYq = is_truthy(checkSpecification.get('installYq', ''))

if installYq:
steps.append({
'name': 'Install yq',
'if': "runner.os == 'Windows'",
'env': {
'YQ_PATH': '${{ runner.temp }}/yq'
},
'run': LiteralScalarString(
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The directory $YQ_PATH should be created before downloading the file to ensure it exists. Consider adding mkdir -p "$YQ_PATH" as the first line of the run script to be consistent with similar patterns elsewhere in the codebase (e.g., .github/workflows/__cleanup-db-cluster-dir.yml:60).

Suggested change
'run': LiteralScalarString(
'run': LiteralScalarString(
'mkdir -p "$YQ_PATH"\n'

Copilot uses AI. Check for mistakes.
'gh release download --repo mikefarah/yq --pattern "yq_windows_amd64.exe" v4.50.1 -O "$YQ_PATH/yq.exe"\n'
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The yq version v4.50.1 is hardcoded without any inline comment or documentation. Consider adding a comment explaining why this specific version was chosen (e.g., matching the version used by Chocolatey) and how to update it in the future. This would improve maintainability, especially since other tool installations (Java, Go, Python, .NET) use configurable versions via workflow inputs.

Copilot uses AI. Check for mistakes.
'echo "$YQ_PATH" >> "$GITHUB_PATH"'
),
})

# If container initialisation steps are present in the check specification,
# make sure to execute them first.
if 'container' in checkSpecification and 'container-init-steps' in checkSpecification:
Expand Down
Loading