aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mholt/archiver/v3/azure-pipelines.yml
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mholt/archiver/v3/azure-pipelines.yml')
-rw-r--r--vendor/github.com/mholt/archiver/v3/azure-pipelines.yml48
1 files changed, 35 insertions, 13 deletions
diff --git a/vendor/github.com/mholt/archiver/v3/azure-pipelines.yml b/vendor/github.com/mholt/archiver/v3/azure-pipelines.yml
index a86a62059f..43f19ae8ca 100644
--- a/vendor/github.com/mholt/archiver/v3/azure-pipelines.yml
+++ b/vendor/github.com/mholt/archiver/v3/azure-pipelines.yml
@@ -4,10 +4,11 @@ trigger:
strategy:
matrix:
linux:
- imageName: ubuntu-16.04
+ imageName: ubuntu-18.04
gorootDir: /usr/local
mac:
- imageName: macos-10.13
+ # Mojave
+ imageName: macos-10.14
gorootDir: /usr/local
windows:
imageName: windows-2019
@@ -26,6 +27,12 @@ variables:
#GO111MODULE: on
steps:
+
+- bash: git config --global core.autocrlf false
+ displayName: "Disable line ending conversion for git to"
+
+- checkout: self
+
- bash: |
latestGo=$(curl "https://golang.org/VERSION?m=text")
echo "##vso[task.setvariable variable=LATEST_GO]$latestGo"
@@ -57,18 +64,16 @@ steps:
displayName: Install Go on macOS
- powershell: |
- Write-Host "Downloading Go... (please be patient, I am very slow)"
- (New-Object System.Net.WebClient).DownloadFile("https://dl.google.com/go/$(LATEST_GO).windows-amd64.zip", "$(LATEST_GO).windows-amd64.zip")
- Write-Host "Extracting Go... (I'm slow too)"
- Expand-Archive "$(LATEST_GO).windows-amd64.zip" -DestinationPath "$(gorootDir)"
+ echo "Downloading Go..."
+ # Windows comes with BSD curl, which is MUCH faster than the native Windows HTTP
+ curl.exe -fsSL -o "$(LATEST_GO).windows-amd64.zip" "https://dl.google.com/go/$(LATEST_GO).windows-amd64.zip"
+ echo "Extracting Go..."
+ # Yes, Windows tar (BSD tar) handles zip files. Who knew!?
+ # (and it's MUCH, MUCH, MUCH faster than the native Windows expander)
+ tar.exe xf "$(LATEST_GO).windows-amd64.zip" -C "$(gorootDir)"
condition: eq( variables['Agent.OS'], 'Windows_NT' )
displayName: Install Go on Windows
-# TODO: When this issue is fixed, replace with installer script:
-# https://github.com/golangci/golangci-lint/issues/472
-- script: go get -v github.com/golangci/golangci-lint/cmd/golangci-lint
- displayName: Install golangci-lint
-
- bash: |
printf "Using go at: $(which go)\n"
printf "Go version: $(go version)\n"
@@ -78,9 +83,26 @@ steps:
env
displayName: Print Go version and environment
+- bash: |
+ go mod tidy
+ if [ ! -z "$(git status --porcelain go.mod)" ]; then
+ printf "go.mod has modifications\n"
+ git diff go.mod
+ exit 1
+ fi
+ if [ ! -z "$(git status --porcelain go.sum)" ]; then
+ printf "go.sum has modifications\n"
+ git diff go.sum
+ exit 1
+ fi
+ workingDirectory: '$(modulePath)'
+ displayName: Ensure that module definition and checksums are correct
+
- script: |
- go get -v -t -d ./...
- golangci-lint run -E gofmt -E goimports -E misspell
+ go get -v -t d ./...
+ # ensure that the CORRECT golangci-list (as per go.mod) is run
+ go mod vendor
+ go run -mod=vendor github.com/golangci/golangci-lint/cmd/golangci-lint run -E gofmt -E goimports -E misspell
go test -race ./...
workingDirectory: '$(modulePath)'
displayName: Run tests