diff --git a/.github/workflows/__all-platform-bundle.yml b/.github/workflows/__all-platform-bundle.yml index 99b6b7bb4..9a1ee56b3 100644 --- a/.github/workflows/__all-platform-bundle.yml +++ b/.github/workflows/__all-platform-bundle.yml @@ -45,6 +45,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'true' setup-kotlin: 'true' + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.21.0' + cache: false - id: init uses: ./../action/init with: diff --git a/.github/workflows/__analyze-ref-input.yml b/.github/workflows/__analyze-ref-input.yml index 52294f42d..3a94ed3b2 100644 --- a/.github/workflows/__analyze-ref-input.yml +++ b/.github/workflows/__analyze-ref-input.yml @@ -49,6 +49,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.21.0' + cache: false - uses: ./../action/init with: tools: ${{ steps.prepare-test.outputs.tools-url }} diff --git a/.github/workflows/__build-mode-manual.yml b/.github/workflows/__build-mode-manual.yml index cae260261..953af3a8e 100644 --- a/.github/workflows/__build-mode-manual.yml +++ b/.github/workflows/__build-mode-manual.yml @@ -45,6 +45,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.21.0' + cache: false - uses: ./../action/init id: init with: diff --git a/.github/workflows/__export-file-baseline-information.yml b/.github/workflows/__export-file-baseline-information.yml index 2f48ad4c5..31de633f0 100644 --- a/.github/workflows/__export-file-baseline-information.yml +++ b/.github/workflows/__export-file-baseline-information.yml @@ -49,6 +49,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.21.0' + cache: false - uses: ./../action/init id: init with: diff --git a/.github/workflows/__go-custom-queries.yml b/.github/workflows/__go-custom-queries.yml index 5459ab3f0..7a6c55102 100644 --- a/.github/workflows/__go-custom-queries.yml +++ b/.github/workflows/__go-custom-queries.yml @@ -47,9 +47,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' - - uses: actions/setup-go@v5 + - name: Install Go + uses: actions/setup-go@v5 with: go-version: '>=1.21.0' + cache: false - uses: ./../action/init with: languages: go diff --git a/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml b/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml index 7136d70ce..6cf6f6f24 100644 --- a/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml +++ b/.github/workflows/__go-indirect-tracing-workaround-diagnostic.yml @@ -45,10 +45,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' - - uses: actions/setup-go@v5 + - name: Install Go + uses: actions/setup-go@v5 with: - # We need a Go version that ships with statically linked binaries on Linux go-version: '>=1.21.0' + cache: false - uses: ./../action/init with: languages: go diff --git a/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml b/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml index 341f4f70a..3e005174f 100644 --- a/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml +++ b/.github/workflows/__go-indirect-tracing-workaround-no-file-program.yml @@ -45,10 +45,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' - - uses: actions/setup-go@v5 + - name: Install Go + uses: actions/setup-go@v5 with: - # We need a Go version that ships with statically linked binaries on Linux go-version: '>=1.21.0' + cache: false - name: Remove `file` program run: | echo $(which file) diff --git a/.github/workflows/__go-indirect-tracing-workaround.yml b/.github/workflows/__go-indirect-tracing-workaround.yml index 24c95104d..c47bc56b9 100644 --- a/.github/workflows/__go-indirect-tracing-workaround.yml +++ b/.github/workflows/__go-indirect-tracing-workaround.yml @@ -45,10 +45,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' - - uses: actions/setup-go@v5 + - name: Install Go + uses: actions/setup-go@v5 with: - # We need a Go version that ships with statically linked binaries on Linux go-version: '>=1.21.0' + cache: false - uses: ./../action/init with: languages: go diff --git a/.github/workflows/__go-tracing-autobuilder.yml b/.github/workflows/__go-tracing-autobuilder.yml index 5adae3f44..85a9fae07 100644 --- a/.github/workflows/__go-tracing-autobuilder.yml +++ b/.github/workflows/__go-tracing-autobuilder.yml @@ -75,11 +75,10 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' - - uses: actions/setup-go@v5 + - name: Install Go + uses: actions/setup-go@v5 with: - go-version: ~1.24.0 - # to avoid potentially misleading autobuilder results where we expect it to download - # dependencies successfully, but they actually come from a warm cache + go-version: '>=1.21.0' cache: false - uses: ./../action/init with: diff --git a/.github/workflows/__go-tracing-custom-build-steps.yml b/.github/workflows/__go-tracing-custom-build-steps.yml index 99d162e71..02f1e1dac 100644 --- a/.github/workflows/__go-tracing-custom-build-steps.yml +++ b/.github/workflows/__go-tracing-custom-build-steps.yml @@ -75,11 +75,10 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' - - uses: actions/setup-go@v5 + - name: Install Go + uses: actions/setup-go@v5 with: - go-version: ~1.24.0 - # to avoid potentially misleading autobuilder results where we expect it to download - # dependencies successfully, but they actually come from a warm cache + go-version: '>=1.21.0' cache: false - uses: ./../action/init with: diff --git a/.github/workflows/__go-tracing-legacy-workflow.yml b/.github/workflows/__go-tracing-legacy-workflow.yml index 76427e813..b6049c158 100644 --- a/.github/workflows/__go-tracing-legacy-workflow.yml +++ b/.github/workflows/__go-tracing-legacy-workflow.yml @@ -75,11 +75,10 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' - - uses: actions/setup-go@v5 + - name: Install Go + uses: actions/setup-go@v5 with: - go-version: ~1.24.0 - # to avoid potentially misleading autobuilder results where we expect it to download - # dependencies successfully, but they actually come from a warm cache + go-version: '>=1.21.0' cache: false - uses: ./../action/init with: diff --git a/.github/workflows/__multi-language-autodetect.yml b/.github/workflows/__multi-language-autodetect.yml index b323d506b..2d8c93417 100644 --- a/.github/workflows/__multi-language-autodetect.yml +++ b/.github/workflows/__multi-language-autodetect.yml @@ -75,10 +75,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' - - uses: actions/setup-go@v5 + - name: Install Go + uses: actions/setup-go@v5 with: go-version: '>=1.21.0' - + cache: false - uses: ./../action/init id: init with: diff --git a/.github/workflows/__packaging-codescanning-config-inputs-js.yml b/.github/workflows/__packaging-codescanning-config-inputs-js.yml index bb54bc83a..0106bbdbf 100644 --- a/.github/workflows/__packaging-codescanning-config-inputs-js.yml +++ b/.github/workflows/__packaging-codescanning-config-inputs-js.yml @@ -61,6 +61,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.21.0' + cache: false - uses: ./../action/init with: config-file: .github/codeql/codeql-config-packaging3.yml diff --git a/.github/workflows/__packaging-config-inputs-js.yml b/.github/workflows/__packaging-config-inputs-js.yml index 125ca7a7d..248880770 100644 --- a/.github/workflows/__packaging-config-inputs-js.yml +++ b/.github/workflows/__packaging-config-inputs-js.yml @@ -61,6 +61,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.21.0' + cache: false - uses: ./../action/init with: config-file: .github/codeql/codeql-config-packaging3.yml diff --git a/.github/workflows/__packaging-config-js.yml b/.github/workflows/__packaging-config-js.yml index db3e9b7ed..620406f77 100644 --- a/.github/workflows/__packaging-config-js.yml +++ b/.github/workflows/__packaging-config-js.yml @@ -61,6 +61,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.21.0' + cache: false - uses: ./../action/init with: config-file: .github/codeql/codeql-config-packaging.yml diff --git a/.github/workflows/__packaging-inputs-js.yml b/.github/workflows/__packaging-inputs-js.yml index c5f4bdc35..3c467484d 100644 --- a/.github/workflows/__packaging-inputs-js.yml +++ b/.github/workflows/__packaging-inputs-js.yml @@ -61,6 +61,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.21.0' + cache: false - uses: ./../action/init with: config-file: .github/codeql/codeql-config-packaging2.yml diff --git a/.github/workflows/__remote-config.yml b/.github/workflows/__remote-config.yml index a615c66ad..6041b0fb4 100644 --- a/.github/workflows/__remote-config.yml +++ b/.github/workflows/__remote-config.yml @@ -47,6 +47,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.21.0' + cache: false - uses: ./../action/init with: tools: ${{ steps.prepare-test.outputs.tools-url }} diff --git a/.github/workflows/__split-workflow.yml b/.github/workflows/__split-workflow.yml index c1e0058c1..fe7f0dad6 100644 --- a/.github/workflows/__split-workflow.yml +++ b/.github/workflows/__split-workflow.yml @@ -55,6 +55,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.21.0' + cache: false - uses: ./../action/init with: config-file: .github/codeql/codeql-config-packaging3.yml diff --git a/.github/workflows/__swift-custom-build.yml b/.github/workflows/__swift-custom-build.yml index 1e6009c66..b2ee00c49 100644 --- a/.github/workflows/__swift-custom-build.yml +++ b/.github/workflows/__swift-custom-build.yml @@ -49,6 +49,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.21.0' + cache: false - uses: ./../action/init id: init with: diff --git a/.github/workflows/__test-local-codeql.yml b/.github/workflows/__test-local-codeql.yml index c14d9543a..3f565ca62 100644 --- a/.github/workflows/__test-local-codeql.yml +++ b/.github/workflows/__test-local-codeql.yml @@ -45,6 +45,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.21.0' + cache: false - name: Fetch a CodeQL bundle shell: bash env: diff --git a/.github/workflows/__unset-environment.yml b/.github/workflows/__unset-environment.yml index 82ac0e60b..2464da7ae 100644 --- a/.github/workflows/__unset-environment.yml +++ b/.github/workflows/__unset-environment.yml @@ -47,6 +47,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.21.0' + cache: false - uses: ./../action/init id: init with: @@ -54,9 +59,6 @@ jobs: # Swift is not supported on Ubuntu so we manually exclude it from the list here languages: cpp,csharp,go,java,javascript,python,ruby tools: ${{ steps.prepare-test.outputs.tools-url }} - - uses: actions/setup-go@v5 - with: - go-version: '>=1.21.0' - name: Build code shell: bash run: env -i PATH="$PATH" HOME="$HOME" ./build.sh diff --git a/.github/workflows/__upload-ref-sha-input.yml b/.github/workflows/__upload-ref-sha-input.yml index a1a5ad4b8..e7ec0542b 100644 --- a/.github/workflows/__upload-ref-sha-input.yml +++ b/.github/workflows/__upload-ref-sha-input.yml @@ -49,6 +49,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.21.0' + cache: false - uses: ./../action/init with: tools: ${{ steps.prepare-test.outputs.tools-url }} diff --git a/.github/workflows/__with-checkout-path.yml b/.github/workflows/__with-checkout-path.yml index 524f96517..3be22ef2b 100644 --- a/.github/workflows/__with-checkout-path.yml +++ b/.github/workflows/__with-checkout-path.yml @@ -49,6 +49,11 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: '>=1.21.0' + cache: false - name: Delete original checkout shell: bash run: | diff --git a/pr-checks/checks/all-platform-bundle.yml b/pr-checks/checks/all-platform-bundle.yml index 665152427..ed68196aa 100644 --- a/pr-checks/checks/all-platform-bundle.yml +++ b/pr-checks/checks/all-platform-bundle.yml @@ -3,12 +3,13 @@ description: "Tests using an all-platform CodeQL Bundle" versions: ["nightly-latest"] operatingSystems: ["ubuntu"] useAllPlatformBundle: "true" +installGo: "true" steps: - id: init uses: ./../action/init with: # Swift is not supported on Ubuntu so we manually exclude it from the list here - languages: cpp,csharp,go,java,javascript,python,ruby + languages: cpp,csharp,go,java,javascript,python,ruby tools: ${{ steps.prepare-test.outputs.tools-url }} - name: Build code shell: bash diff --git a/pr-checks/checks/analyze-ref-input.yml b/pr-checks/checks/analyze-ref-input.yml index e790b8674..c0077c20e 100644 --- a/pr-checks/checks/analyze-ref-input.yml +++ b/pr-checks/checks/analyze-ref-input.yml @@ -1,6 +1,7 @@ name: "Analyze: 'ref' and 'sha' from inputs" description: "Checks that specifying 'ref' and 'sha' as inputs works" versions: ["default"] +installGo: "true" steps: - uses: ./../action/init with: diff --git a/pr-checks/checks/build-mode-manual.yml b/pr-checks/checks/build-mode-manual.yml index add7d04d4..4e6271498 100644 --- a/pr-checks/checks/build-mode-manual.yml +++ b/pr-checks/checks/build-mode-manual.yml @@ -2,6 +2,7 @@ name: "Build mode manual" description: "An end-to-end integration test of a Java repository built using 'build-mode: manual'" operatingSystems: ["ubuntu"] versions: ["nightly-latest"] +installGo: "true" steps: - uses: ./../action/init id: init diff --git a/pr-checks/checks/export-file-baseline-information.yml b/pr-checks/checks/export-file-baseline-information.yml index 5077b461e..10f7bf752 100644 --- a/pr-checks/checks/export-file-baseline-information.yml +++ b/pr-checks/checks/export-file-baseline-information.yml @@ -1,6 +1,7 @@ name: "Export file baseline information" description: "Tests that file baseline information is exported when the feature is enabled" versions: ["nightly-latest"] +installGo: "true" env: CODEQL_ACTION_SUBLANGUAGE_FILE_COVERAGE: true steps: diff --git a/pr-checks/checks/go-custom-queries.yml b/pr-checks/checks/go-custom-queries.yml index dd3819911..2b3258bc7 100644 --- a/pr-checks/checks/go-custom-queries.yml +++ b/pr-checks/checks/go-custom-queries.yml @@ -5,12 +5,10 @@ operatingSystems: versions: - linked - nightly-latest +installGo: "true" env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" steps: - - uses: actions/setup-go@v5 - with: - go-version: ">=1.21.0" - uses: ./../action/init with: languages: go diff --git a/pr-checks/checks/go-indirect-tracing-workaround-diagnostic.yml b/pr-checks/checks/go-indirect-tracing-workaround-diagnostic.yml index 0638262bf..7e0acbe6d 100644 --- a/pr-checks/checks/go-indirect-tracing-workaround-diagnostic.yml +++ b/pr-checks/checks/go-indirect-tracing-workaround-diagnostic.yml @@ -4,11 +4,8 @@ description: "Checks that we emit a diagnostic if Go is changed after the init s operatingSystems: ["ubuntu"] # pinned to a version which does not support statically linked binaries for indirect tracing versions: ["default"] +installGo: "true" steps: - - uses: actions/setup-go@v5 - with: - # We need a Go version that ships with statically linked binaries on Linux - go-version: ">=1.21.0" - uses: ./../action/init with: languages: go diff --git a/pr-checks/checks/go-indirect-tracing-workaround-no-file-program.yml b/pr-checks/checks/go-indirect-tracing-workaround-no-file-program.yml index e7e6ee9a0..830dea00f 100644 --- a/pr-checks/checks/go-indirect-tracing-workaround-no-file-program.yml +++ b/pr-checks/checks/go-indirect-tracing-workaround-no-file-program.yml @@ -4,11 +4,8 @@ description: "Checks that we emit a diagnostic if the `file` program is not inst operatingSystems: ["ubuntu"] # pinned to a version which does not support statically linked binaries for indirect tracing versions: ["default"] +installGo: "true" steps: - - uses: actions/setup-go@v5 - with: - # We need a Go version that ships with statically linked binaries on Linux - go-version: ">=1.21.0" - name: Remove `file` program run: | echo $(which file) diff --git a/pr-checks/checks/go-indirect-tracing-workaround.yml b/pr-checks/checks/go-indirect-tracing-workaround.yml index fff42da97..859b0516b 100644 --- a/pr-checks/checks/go-indirect-tracing-workaround.yml +++ b/pr-checks/checks/go-indirect-tracing-workaround.yml @@ -4,11 +4,8 @@ description: "Checks that our workaround for indirect tracing for Go 1.21+ on Li operatingSystems: ["ubuntu"] # pinned to a version which does not support statically linked binaries for indirect tracing versions: ["default"] +installGo: "true" steps: - - uses: actions/setup-go@v5 - with: - # We need a Go version that ships with statically linked binaries on Linux - go-version: ">=1.21.0" - uses: ./../action/init with: languages: go diff --git a/pr-checks/checks/go-tracing-autobuilder.yml b/pr-checks/checks/go-tracing-autobuilder.yml index 8fd2987e5..85d8c486b 100644 --- a/pr-checks/checks/go-tracing-autobuilder.yml +++ b/pr-checks/checks/go-tracing-autobuilder.yml @@ -3,13 +3,8 @@ description: "Checks that Go tracing works when using an autobuilder step" operatingSystems: ["ubuntu", "macos"] env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" +installGo: "true" steps: - - uses: actions/setup-go@v5 - with: - go-version: "~1.24.0" - # to avoid potentially misleading autobuilder results where we expect it to download - # dependencies successfully, but they actually come from a warm cache - cache: false - uses: ./../action/init with: languages: go diff --git a/pr-checks/checks/go-tracing-custom-build-steps.yml b/pr-checks/checks/go-tracing-custom-build-steps.yml index 908c45841..4b7b11582 100644 --- a/pr-checks/checks/go-tracing-custom-build-steps.yml +++ b/pr-checks/checks/go-tracing-custom-build-steps.yml @@ -1,13 +1,8 @@ name: "Go: tracing with custom build steps" description: "Checks that Go tracing traces the build when using custom build steps" operatingSystems: ["ubuntu", "macos"] +installGo: "true" steps: - - uses: actions/setup-go@v5 - with: - go-version: "~1.24.0" - # to avoid potentially misleading autobuilder results where we expect it to download - # dependencies successfully, but they actually come from a warm cache - cache: false - uses: ./../action/init with: languages: go diff --git a/pr-checks/checks/go-tracing-legacy-workflow.yml b/pr-checks/checks/go-tracing-legacy-workflow.yml index f544af027..5cec8818c 100644 --- a/pr-checks/checks/go-tracing-legacy-workflow.yml +++ b/pr-checks/checks/go-tracing-legacy-workflow.yml @@ -3,13 +3,8 @@ description: "Checks that we run the autobuilder in legacy workflows with neithe operatingSystems: ["ubuntu", "macos"] env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" +installGo: "true" steps: - - uses: actions/setup-go@v5 - with: - go-version: "~1.24.0" - # to avoid potentially misleading autobuilder results where we expect it to download - # dependencies successfully, but they actually come from a warm cache - cache: false - uses: ./../action/init with: languages: go diff --git a/pr-checks/checks/multi-language-autodetect.yml b/pr-checks/checks/multi-language-autodetect.yml index 24049fb72..197c99afb 100644 --- a/pr-checks/checks/multi-language-autodetect.yml +++ b/pr-checks/checks/multi-language-autodetect.yml @@ -1,11 +1,8 @@ name: "Multi-language repository" description: "An end-to-end integration test of a multi-language repository using automatic language detection for macOS" operatingSystems: ["macos", "ubuntu"] +installGo: "true" steps: - - uses: actions/setup-go@v5 - with: - go-version: ">=1.21.0" - - uses: ./../action/init id: init with: diff --git a/pr-checks/checks/packaging-codescanning-config-inputs-js.yml b/pr-checks/checks/packaging-codescanning-config-inputs-js.yml index c4d745cf4..13e7d5617 100644 --- a/pr-checks/checks/packaging-codescanning-config-inputs-js.yml +++ b/pr-checks/checks/packaging-codescanning-config-inputs-js.yml @@ -1,6 +1,7 @@ name: "Packaging: Config and input passed to the CLI" description: "Checks that specifying packages using a combination of a config file and input to the Action works" versions: ["linked", "default", "nightly-latest"] # This feature is not compatible with old CLIs +installGo: "true" steps: - uses: ./../action/init with: diff --git a/pr-checks/checks/packaging-config-inputs-js.yml b/pr-checks/checks/packaging-config-inputs-js.yml index ca7c2de9b..869c9f6bd 100644 --- a/pr-checks/checks/packaging-config-inputs-js.yml +++ b/pr-checks/checks/packaging-config-inputs-js.yml @@ -1,6 +1,7 @@ name: "Packaging: Config and input" description: "Checks that specifying packages using a combination of a config file and input to the Action works" versions: ["linked", "default", "nightly-latest"] # This feature is not compatible with old CLIs +installGo: "true" steps: - uses: ./../action/init with: diff --git a/pr-checks/checks/packaging-config-js.yml b/pr-checks/checks/packaging-config-js.yml index 6b94d2f19..d12691344 100644 --- a/pr-checks/checks/packaging-config-js.yml +++ b/pr-checks/checks/packaging-config-js.yml @@ -1,6 +1,7 @@ name: "Packaging: Config file" description: "Checks that specifying packages using only a config file works" versions: ["linked", "default", "nightly-latest"] # This feature is not compatible with old CLIs +installGo: "true" steps: - uses: ./../action/init with: diff --git a/pr-checks/checks/packaging-inputs-js.yml b/pr-checks/checks/packaging-inputs-js.yml index 77f3fd403..ae3a79a37 100644 --- a/pr-checks/checks/packaging-inputs-js.yml +++ b/pr-checks/checks/packaging-inputs-js.yml @@ -1,6 +1,7 @@ name: "Packaging: Action input" description: "Checks that specifying packages using the input to the Action works" versions: ["linked", "default", "nightly-latest"] # This feature is not compatible with old CLIs +installGo: "true" steps: - uses: ./../action/init with: diff --git a/pr-checks/checks/remote-config.yml b/pr-checks/checks/remote-config.yml index 75798dec0..0b35acbe1 100644 --- a/pr-checks/checks/remote-config.yml +++ b/pr-checks/checks/remote-config.yml @@ -5,6 +5,7 @@ operatingSystems: versions: - linked - nightly-latest +installGo: "true" steps: - uses: ./../action/init with: diff --git a/pr-checks/checks/split-workflow.yml b/pr-checks/checks/split-workflow.yml index 771f65b66..899d6b6e1 100644 --- a/pr-checks/checks/split-workflow.yml +++ b/pr-checks/checks/split-workflow.yml @@ -2,6 +2,7 @@ name: "Split workflow" description: "Tests a split-up workflow in which we first build a database and later analyze it" operatingSystems: ["ubuntu", "macos"] versions: ["linked", "default", "nightly-latest"] # This feature is not compatible with old CLIs +installGo: "true" steps: - uses: ./../action/init with: diff --git a/pr-checks/checks/swift-custom-build.yml b/pr-checks/checks/swift-custom-build.yml index bde017eaf..31c6a55ab 100644 --- a/pr-checks/checks/swift-custom-build.yml +++ b/pr-checks/checks/swift-custom-build.yml @@ -2,6 +2,7 @@ name: "Swift analysis using a custom build command" description: "Tests creation of a Swift database using custom build" versions: ["linked", "default", "nightly-latest"] operatingSystems: ["macos"] +installGo: "true" env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" steps: diff --git a/pr-checks/checks/test-local-codeql.yml b/pr-checks/checks/test-local-codeql.yml index 8b1f22009..da52eeea8 100644 --- a/pr-checks/checks/test-local-codeql.yml +++ b/pr-checks/checks/test-local-codeql.yml @@ -2,6 +2,7 @@ name: "Local CodeQL bundle" description: "Tests using a CodeQL bundle from a local file rather than a URL" versions: ["nightly-latest"] operatingSystems: ["ubuntu"] +installGo: "true" steps: - name: Fetch a CodeQL bundle shell: bash diff --git a/pr-checks/checks/unset-environment.yml b/pr-checks/checks/unset-environment.yml index 48cc7e9b3..67595a5c7 100644 --- a/pr-checks/checks/unset-environment.yml +++ b/pr-checks/checks/unset-environment.yml @@ -5,17 +5,15 @@ operatingSystems: versions: - linked - nightly-latest +installGo: "true" steps: - uses: ./../action/init id: init with: db-location: ${{ runner.temp }}/customDbLocation # Swift is not supported on Ubuntu so we manually exclude it from the list here - languages: cpp,csharp,go,java,javascript,python,ruby + languages: cpp,csharp,go,java,javascript,python,ruby tools: ${{ steps.prepare-test.outputs.tools-url }} - - uses: actions/setup-go@v5 - with: - go-version: '>=1.21.0' - name: Build code shell: bash run: env -i PATH="$PATH" HOME="$HOME" ./build.sh diff --git a/pr-checks/checks/upload-ref-sha-input.yml b/pr-checks/checks/upload-ref-sha-input.yml index dea1b935e..f19b1a676 100644 --- a/pr-checks/checks/upload-ref-sha-input.yml +++ b/pr-checks/checks/upload-ref-sha-input.yml @@ -1,6 +1,7 @@ name: "Upload-sarif: 'ref' and 'sha' from inputs" description: "Checks that specifying 'ref' and 'sha' as inputs works" versions: ["default"] +installGo: "true" steps: - uses: ./../action/init with: diff --git a/pr-checks/checks/with-checkout-path.yml b/pr-checks/checks/with-checkout-path.yml index cf5a27a83..62e2adf2b 100644 --- a/pr-checks/checks/with-checkout-path.yml +++ b/pr-checks/checks/with-checkout-path.yml @@ -1,6 +1,7 @@ name: "Use a custom `checkout_path`" description: "Checks that a custom `checkout_path` will find the proper commit_oid" versions: ["linked"] +installGo: "true" steps: # This ensures we don't accidentally use the original checkout for any part of the test. - name: Delete original checkout diff --git a/pr-checks/sync.py b/pr-checks/sync.py index 9986f2ae9..c8a2ff196 100755 --- a/pr-checks/sync.py +++ b/pr-checks/sync.py @@ -108,6 +108,22 @@ for file in (this_dir / 'checks').glob('*.yml'): }, ] + installGo = False + if checkSpecification.get('installGo'): + installGo = True if checkSpecification['installGo'].lower() == "true" else False + + if installGo: + steps.append({ + 'name': 'Install Go', + 'uses': 'actions/setup-go@v5', + 'with': { + 'go-version': '>=1.21.0', + # to avoid potentially misleading autobuilder results where we expect it to download + # dependencies successfully, but they actually come from a warm cache + 'cache': False + } + }) + # 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: