Skip to content

Commit 07b9db6

Browse files
committed
Explicitly set up Go 1.13.1 in checks running on old runner images
1 parent 1e2f8f0 commit 07b9db6

16 files changed

+70
-28
lines changed

.github/workflows/__analyze-ref-input.yml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__go-custom-queries.yml

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__go-tracing-autobuilder.yml

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__go-tracing-custom-build-steps.yml

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__go-tracing-legacy-workflow.yml

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__ml-powered-queries.yml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__multi-language-autodetect.yml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__remote-config.yml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__unset-environment.yml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__upload-ref-sha-input.yml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__with-checkout-path.yml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pr-checks/checks/go-custom-queries.yml

-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ description: "Checks that Go works in conjunction with a config file specifying
33
env:
44
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
55
steps:
6-
- uses: actions/setup-go@v3
7-
with:
8-
go-version: "^1.13.1"
96
- uses: ./../action/init
107
with:
118
languages: go

pr-checks/checks/go-tracing-autobuilder.yml

-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ operatingSystems: ["ubuntu", "macos"]
44
env:
55
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
66
steps:
7-
- uses: actions/setup-go@v3
8-
with:
9-
go-version: "^1.13.1"
107
- uses: ./../action/init
118
with:
129
languages: go

pr-checks/checks/go-tracing-custom-build-steps.yml

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: "Go: tracing with custom build steps"
22
description: "Checks that Go tracing traces the build when using custom build steps"
33
operatingSystems: ["ubuntu", "macos"]
44
steps:
5-
- uses: actions/setup-go@v3
6-
with:
7-
go-version: "^1.13.1"
85
- uses: ./../action/init
96
with:
107
languages: go

pr-checks/checks/go-tracing-legacy-workflow.yml

-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ operatingSystems: ["ubuntu", "macos"]
44
env:
55
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
66
steps:
7-
- uses: actions/setup-go@v3
8-
with:
9-
go-version: "^1.13.1"
107
- uses: ./../action/init
118
with:
129
languages: go

pr-checks/sync.py

+23-12
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,19 @@ def writeHeader(checkStream):
5858
with open(f"checks/{file}", 'r') as checkStream:
5959
checkSpecification = yaml.load(checkStream)
6060

61+
matrix = []
62+
for version in checkSpecification.get('versions', defaultTestVersions):
63+
runnerImages = operatingSystemsForVersion(version)
64+
if checkSpecification.get('operatingSystems', None):
65+
runnerImages = [image for image in runnerImages for operatingSystem in checkSpecification['operatingSystems']
66+
if image.startswith(operatingSystem)]
67+
68+
for runnerImage in runnerImages:
69+
matrix.append({
70+
'os': runnerImage,
71+
'version': version
72+
})
73+
6174
steps = [
6275
{
6376
'name': 'Check out repository',
@@ -72,20 +85,18 @@ def writeHeader(checkStream):
7285
}
7386
}
7487
]
75-
steps.extend(checkSpecification['steps'])
7688

77-
matrix = []
78-
for version in checkSpecification.get('versions', defaultTestVersions):
79-
runnerImages = operatingSystemsForVersion(version)
80-
if checkSpecification.get('operatingSystems', None):
81-
runnerImages = [image for image in runnerImages for operatingSystem in checkSpecification['operatingSystems']
82-
if image.startswith(operatingSystem)]
89+
if any(not isCompatibleWithLatestImages(m['version']) for m in matrix):
90+
steps.append({
91+
'name': 'Set up Go',
92+
'if': "matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019'",
93+
'uses': 'actions/setup-go@v3',
94+
'with': {
95+
'go-version': '^1.13.1'
96+
}
97+
})
8398

84-
for runnerImage in runnerImages:
85-
matrix.append({
86-
'os': runnerImage,
87-
'version': version
88-
})
99+
steps.extend(checkSpecification['steps'])
89100

90101
checkJob = {
91102
'strategy': {

0 commit comments

Comments
 (0)