-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy path.travis.yml
40 lines (39 loc) · 1.17 KB
/
.travis.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
branches:
only:
- main
dist: focal
sudo: true
addons:
apt:
packages:
- qemu-kvm
- qemu-utils
- libmnl-dev
- genext2fs
language: go
go:
- 1.22.x
- 1.21.x
env:
- GOFLAGS="-buildvcs=false"
before_script:
# See https://github.com/codeclimate/test-reporter/blob/master/examples/go_examples.md
- curl --retry 5 -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod a+x ./cc-test-reporter
- sudo -E env "PATH=$PATH" ./cc-test-reporter before-build
- sudo -E env "PATH=$PATH" go install github.com/mattn/goveralls@latest
script:
- sudo -E env "PATH=$PATH" make gokvm
- travis_retry sudo -E env "PATH=$PATH" make test
after_script:
- sudo -E env "PATH=$PATH" goveralls -service=travis-ci -coverprofile c.out
- sudo -E env "PATH=$PATH" ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- sudo -E env "PATH=$PATH" make clean
deploy:
- provider: script
skip_cleanup: true
script: curl --retry 5 -sL https://git.io/goreleaser | bash
on:
# https://docs.travis-ci.com/user/languages/go/#environment-variable
tags: true
condition: $TRAVIS_GO_VERSION =~ ^1\.20