Skip to content

Commit 3eb0eac

Browse files
authored
Merge pull request #14 from jfontan/upgrade-ci-system
Upgrade ci system
2 parents 304ab28 + 81b6221 commit 3eb0eac

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
language: go
22

33
go:
4-
- 1.9.x
4+
- 1.11.x
55
- 1.10.x
6-
- tip
76

87
go_import_path: gopkg.in/src-d/go-queue.v1
98

Makefile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ PROJECT = go-queue
33
COMMANDS =
44

55
# Including ci Makefile
6-
MAKEFILE = Makefile.main
7-
CI_REPOSITORY = https://github.com/src-d/ci.git
8-
CI_FOLDER = .ci
9-
6+
CI_REPOSITORY ?= https://github.com/src-d/ci.git
7+
CI_BRANCH ?= v1
8+
CI_PATH ?= .ci
9+
MAKEFILE := $(CI_PATH)/Makefile.main
1010
$(MAKEFILE):
11-
@git clone --quiet $(CI_REPOSITORY) $(CI_FOLDER); \
12-
cp $(CI_FOLDER)/$(MAKEFILE) .;
13-
11+
git clone --quiet --depth 1 -b $(CI_BRANCH) $(CI_REPOSITORY) $(CI_PATH);
1412
-include $(MAKEFILE)

amqp/amqp_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package queue
33
import (
44
"context"
55
"fmt"
6+
"os"
67
"os/exec"
78
"testing"
89
"time"
@@ -15,18 +16,20 @@ import (
1516
"github.com/stretchr/testify/suite"
1617
)
1718

18-
// RabbitMQ tests require running docker.
19+
// RabbitMQ reconnect tests require running docker.
1920
// If `docker ps` command returned an error we skip some of the tests.
2021
var (
2122
dockerIsRunning bool
2223
dockerCmdOutput string
24+
inAppVeyor bool
2325
)
2426

2527
func init() {
2628
cmd := exec.Command("docker", "ps")
2729
b, err := cmd.CombinedOutput()
2830

2931
dockerCmdOutput, dockerIsRunning = string(b), (err == nil)
32+
inAppVeyor = os.Getenv("APPVEYOR") == "True"
3033
}
3134

3235
func TestAMQPSuite(t *testing.T) {
@@ -226,7 +229,7 @@ func TestAMQPRepublishBuried(t *testing.T) {
226229
}
227230

228231
func TestReconnect(t *testing.T) {
229-
if !dockerIsRunning {
232+
if inAppVeyor || !dockerIsRunning {
230233
t.Skip()
231234
}
232235

appveyor.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
version: "{build}"
2+
image: Visual Studio 2017
23
platform: x64
34

45
clone_folder: c:\gopath\src\gopkg.in\src-d\go-queue.v1
56

67
environment:
78
GOPATH: c:\gopath
9+
RABBITMQ_VERSION: any
810

9-
before_test:
10-
- set PATH=C:\Program Files\erl9.2\bin;%PATH%
11-
- choco install rabbitmq --ignoredependencies -y
12-
- ps: Start-Sleep -s 2
11+
cache:
12+
- C:\Users\appveyor\AppData\Local\Temp\chocolatey\ -> appveyor.yml
1313

14-
build_script:
15-
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
16-
- go version
17-
- go get -v -t ./...
14+
install:
15+
- set PATH=%GOPATH%\bin;C:\go\bin;C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;C:\msys64\usr\bin;%PATH%;"C:\Program Files\Git\mingw64\bin"
16+
- mingw32-make ci-install
1817

1918
test_script:
20-
- go test -v ./...
19+
- mingw32-make test
20+
21+
build: off
22+
deploy: off

0 commit comments

Comments
 (0)