Explicitly set up Go 1.13.1 in checks running on old runner images
This commit is contained in:
parent
1e2f8f035d
commit
07b9db6a46
16 changed files with 71 additions and 29 deletions
|
|
@ -3,9 +3,6 @@ description: "Checks that Go works in conjunction with a config file specifying
|
|||
env:
|
||||
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
|
||||
steps:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: "^1.13.1"
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
languages: go
|
||||
|
|
|
|||
|
|
@ -4,9 +4,6 @@ operatingSystems: ["ubuntu", "macos"]
|
|||
env:
|
||||
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
|
||||
steps:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: "^1.13.1"
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
languages: go
|
||||
|
|
|
|||
|
|
@ -2,9 +2,6 @@ name: "Go: tracing with custom build steps"
|
|||
description: "Checks that Go tracing traces the build when using custom build steps"
|
||||
operatingSystems: ["ubuntu", "macos"]
|
||||
steps:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: "^1.13.1"
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
languages: go
|
||||
|
|
|
|||
|
|
@ -4,9 +4,6 @@ operatingSystems: ["ubuntu", "macos"]
|
|||
env:
|
||||
DOTNET_GENERATE_ASPNET_CERTIFICATE: "false"
|
||||
steps:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: "^1.13.1"
|
||||
- uses: ./../action/init
|
||||
with:
|
||||
languages: go
|
||||
|
|
|
|||
|
|
@ -58,6 +58,19 @@ for file in os.listdir('checks'):
|
|||
with open(f"checks/{file}", 'r') as checkStream:
|
||||
checkSpecification = yaml.load(checkStream)
|
||||
|
||||
matrix = []
|
||||
for version in checkSpecification.get('versions', defaultTestVersions):
|
||||
runnerImages = operatingSystemsForVersion(version)
|
||||
if checkSpecification.get('operatingSystems', None):
|
||||
runnerImages = [image for image in runnerImages for operatingSystem in checkSpecification['operatingSystems']
|
||||
if image.startswith(operatingSystem)]
|
||||
|
||||
for runnerImage in runnerImages:
|
||||
matrix.append({
|
||||
'os': runnerImage,
|
||||
'version': version
|
||||
})
|
||||
|
||||
steps = [
|
||||
{
|
||||
'name': 'Check out repository',
|
||||
|
|
@ -72,21 +85,19 @@ for file in os.listdir('checks'):
|
|||
}
|
||||
}
|
||||
]
|
||||
|
||||
if any(not isCompatibleWithLatestImages(m['version']) for m in matrix):
|
||||
steps.append({
|
||||
'name': 'Set up Go',
|
||||
'if': "matrix.os == 'ubuntu-20.04' || matrix.os == 'windows-2019'",
|
||||
'uses': 'actions/setup-go@v3',
|
||||
'with': {
|
||||
'go-version': '^1.13.1'
|
||||
}
|
||||
})
|
||||
|
||||
steps.extend(checkSpecification['steps'])
|
||||
|
||||
matrix = []
|
||||
for version in checkSpecification.get('versions', defaultTestVersions):
|
||||
runnerImages = operatingSystemsForVersion(version)
|
||||
if checkSpecification.get('operatingSystems', None):
|
||||
runnerImages = [image for image in runnerImages for operatingSystem in checkSpecification['operatingSystems']
|
||||
if image.startswith(operatingSystem)]
|
||||
|
||||
for runnerImage in runnerImages:
|
||||
matrix.append({
|
||||
'os': runnerImage,
|
||||
'version': version
|
||||
})
|
||||
|
||||
checkJob = {
|
||||
'strategy': {
|
||||
'matrix': {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue