Support go 1.15 (#434)

Fixes #428
This commit is contained in:
Thomas Pelletier
2020-09-10 21:39:16 -04:00
committed by GitHub
parent 9f8f82dfe8
commit 196ce3a1f6
2 changed files with 21 additions and 24 deletions
+20 -20
View File
@@ -13,9 +13,9 @@ stages:
vmImage: ubuntu-latest vmImage: ubuntu-latest
steps: steps:
- task: GoTool@0 - task: GoTool@0
displayName: "Install Go 1.14" displayName: "Install Go 1.15"
inputs: inputs:
version: "1.14" version: "1.15"
- script: echo "##vso[task.setvariable variable=PATH]${PATH}:/home/vsts/go/bin/" - script: echo "##vso[task.setvariable variable=PATH]${PATH}:/home/vsts/go/bin/"
- script: mkdir -p ${HOME}/go/src/github.com/pelletier/go-toml - script: mkdir -p ${HOME}/go/src/github.com/pelletier/go-toml
- script: cp -R . ${HOME}/go/src/github.com/pelletier/go-toml - script: cp -R . ${HOME}/go/src/github.com/pelletier/go-toml
@@ -36,9 +36,9 @@ stages:
vmImage: ubuntu-latest vmImage: ubuntu-latest
steps: steps:
- task: GoTool@0 - task: GoTool@0
displayName: "Install Go 1.14" displayName: "Install Go 1.15"
inputs: inputs:
version: "1.14" version: "1.15"
- task: Go@0 - task: Go@0
displayName: "go fmt ./..." displayName: "go fmt ./..."
inputs: inputs:
@@ -51,9 +51,9 @@ stages:
vmImage: ubuntu-latest vmImage: ubuntu-latest
steps: steps:
- task: GoTool@0 - task: GoTool@0
displayName: "Install Go 1.14" displayName: "Install Go 1.15"
inputs: inputs:
version: "1.14" version: "1.15"
- task: Go@0 - task: Go@0
displayName: "Generate coverage" displayName: "Generate coverage"
inputs: inputs:
@@ -71,9 +71,9 @@ stages:
vmImage: ubuntu-latest vmImage: ubuntu-latest
steps: steps:
- task: GoTool@0 - task: GoTool@0
displayName: "Install Go 1.14" displayName: "Install Go 1.15"
inputs: inputs:
version: "1.14" version: "1.15"
- script: echo "##vso[task.setvariable variable=PATH]${PATH}:/home/vsts/go/bin/" - script: echo "##vso[task.setvariable variable=PATH]${PATH}:/home/vsts/go/bin/"
- task: Bash@3 - task: Bash@3
inputs: inputs:
@@ -86,9 +86,9 @@ stages:
vmImage: ubuntu-latest vmImage: ubuntu-latest
steps: steps:
- task: GoTool@0 - task: GoTool@0
displayName: "Install Go 1.14" displayName: "Install Go 1.15"
inputs: inputs:
version: "1.14" version: "1.15"
- script: echo "##vso[task.setvariable variable=PATH]${PATH}:/home/vsts/go/bin/" - script: echo "##vso[task.setvariable variable=PATH]${PATH}:/home/vsts/go/bin/"
- script: mkdir -p ${HOME}/go/src/github.com/pelletier/go-toml - script: mkdir -p ${HOME}/go/src/github.com/pelletier/go-toml
- script: cp -R . ${HOME}/go/src/github.com/pelletier/go-toml - script: cp -R . ${HOME}/go/src/github.com/pelletier/go-toml
@@ -102,6 +102,15 @@ stages:
displayName: "unit tests" displayName: "unit tests"
strategy: strategy:
matrix: matrix:
linux 1.15:
goVersion: '1.15'
imageName: 'ubuntu-latest'
mac 1.15:
goVersion: '1.15'
imageName: 'macOS-latest'
windows 1.15:
goVersion: '1.15'
imageName: 'windows-latest'
linux 1.14: linux 1.14:
goVersion: '1.14' goVersion: '1.14'
imageName: 'ubuntu-latest' imageName: 'ubuntu-latest'
@@ -111,15 +120,6 @@ stages:
windows 1.14: windows 1.14:
goVersion: '1.14' goVersion: '1.14'
imageName: 'windows-latest' imageName: 'windows-latest'
linux 1.13:
goVersion: '1.13'
imageName: 'ubuntu-latest'
mac 1.13:
goVersion: '1.13'
imageName: 'macOS-latest'
windows 1.13:
goVersion: '1.13'
imageName: 'windows-latest'
pool: pool:
vmImage: $(imageName) vmImage: $(imageName)
steps: steps:
@@ -155,7 +155,7 @@ stages:
- task: GoTool@0 - task: GoTool@0
displayName: "Install Go" displayName: "Install Go"
inputs: inputs:
version: 1.14 version: 1.15
- task: Bash@3 - task: Bash@3
inputs: inputs:
targetType: inline targetType: inline
+1 -4
View File
@@ -2194,10 +2194,7 @@ func TestUnmarshalBadDuration(t *testing.T) {
result := testBadDuration{} result := testBadDuration{}
err := NewDecoder(buf).Decode(&result) err := NewDecoder(buf).Decode(&result)
if err == nil { if err == nil {
t.Fatal() t.Fatal("expected bad duration error")
}
if err.Error() != "(1, 1): Can't convert 1z(string) to time.Duration. time: unknown unit z in duration 1z" {
t.Fatalf("unexpected error: %s", err)
} }
} }