/
.appveyor.yml
54 lines (43 loc) · 1.4 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Version format
version: "{build}"
image: Visual Studio 2015
# Environment variables
environment:
GOPATH: c:\gopath
GO111MODULE: on
GVM_GO_VERSION: 1.18.5
GVM_DL: https://github.com/andrewkroh/gvm/releases/download/v0.4.1/gvm-windows-amd64.exe
# Custom clone folder (variables are not expanded here).
clone_folder: c:\gopath\src\github.com\andrewkroh\gvm
# Cache gvm and Go until appveyor.yml is modified.
cache:
- C:\Users\appveyor\.gvm -> .appveyor.yml
- C:\Windows\System32\gvm.exe -> .appveyor.yml
# Scripts that run after cloning repository
install:
- ps: >-
if(!(Test-Path "C:\Windows\System32\gvm.exe")) {
wget "$env:GVM_DL" -Outfile C:\Windows\System32\gvm.exe
}
- ps: gvm --format=powershell "$env:GVM_GO_VERSION" | Invoke-Expression
- set PATH=%GOROOT%\bin;%PATH%
- set PATH=%GOPATH%\bin;%PATH%
- go version
- go env
before_build:
- go mod verify
build_script:
# Compile
- appveyor AddCompilationMessage "Starting Compile"
- cd c:\gopath\src\github.com\andrewkroh\gvm
- go build .\cmd\gvm
- appveyor AddCompilationMessage "Compile Success"
test_script:
# Unit tests
- ps: Add-AppveyorTest "Unit Tests" -Outcome Running
- go test -v ./...
- ps: Update-AppveyorTest "Unit Tests" -Outcome Passed
# To disable deployment
deploy: off
# Notifications should only be setup using the AppVeyor UI so that
# forks can be created without inheriting the settings.