-
Notifications
You must be signed in to change notification settings - Fork 24
/
appveyor.yml
49 lines (39 loc) · 1.23 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
version: '{branch}-{build}'
branches:
only:
- master
pull_requests:
do_not_increment_build_number: true
image: Ubuntu1804
clone_folder: /home/appveyor/hclq
init:
- sh: |
#!/usr/bin/env bash
set -euo pipefail
# Install Go if it isn't there or if it's out of date.
if ! command -v go &>/dev/null || [[ "$(go version | awk '{print $3}')" != "$GO_VERSION" ]]; then
curl -sSJL https://dl.google.com/go/${GO_VERSION}.linux-amd64.tar.gz | sudo tar xz -C /usr/local
fi
export PATH="$HOME/go/bin:/usr/local/go/bin:$PATH"
# Print environment variables for debugging
env
environment:
GITHUB_TOKEN:
secure: 8ZC8xAVHLPN5ITAX22ceWft9ThYwEnkV0wCwES26qQ0C1ZBRml3tpVy2MjMrEuRz
GITHUB_USER: mattolenik
GITHUB_REPO: hclq
GO_VERSION: go1.12.5
build_script:
- sh: make dist
test_script:
- sh: make testci
deploy_script:
- sh: |
# If we're in AppVeyor and this branch is a tag, it means it should be published.
if [ "$APPVEYOR_REPO_TAG" == "true" ]; then
make publish
fi
on_finish:
- sh: |
# Publish test results to AppVeyor
find "$APPVEYOR_BUILD_FOLDER" -type f -name 'TEST*.xml' -print0 | xargs -0 -I '{}' curl -F 'file=@{}' "https://ci.appveyor.com/api/testresults/junit/$APPVEYOR_JOB_ID"