Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
language: go

go:
- 1.9.x
- 1.11.x
- 1.10.x
- tip

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

Expand Down
12 changes: 5 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ PROJECT = go-queue
COMMANDS =

# Including ci Makefile
MAKEFILE = Makefile.main
CI_REPOSITORY = https://github.com/src-d/ci.git
CI_FOLDER = .ci

CI_REPOSITORY ?= https://github.com/src-d/ci.git
CI_BRANCH ?= v1
CI_PATH ?= .ci
MAKEFILE := $(CI_PATH)/Makefile.main
$(MAKEFILE):
@git clone --quiet $(CI_REPOSITORY) $(CI_FOLDER); \
cp $(CI_FOLDER)/$(MAKEFILE) .;

git clone --quiet --depth 1 -b $(CI_BRANCH) $(CI_REPOSITORY) $(CI_PATH);
-include $(MAKEFILE)
7 changes: 5 additions & 2 deletions amqp/amqp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package queue
import (
"context"
"fmt"
"os"
"os/exec"
"testing"
"time"
Expand All @@ -15,18 +16,20 @@ import (
"github.com/stretchr/testify/suite"
)

// RabbitMQ tests require running docker.
// RabbitMQ reconnect tests require running docker.
// If `docker ps` command returned an error we skip some of the tests.
var (
dockerIsRunning bool
dockerCmdOutput string
inAppVeyor bool
)

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

dockerCmdOutput, dockerIsRunning = string(b), (err == nil)
inAppVeyor = os.Getenv("APPVEYOR") == "True"
}

func TestAMQPSuite(t *testing.T) {
Expand Down Expand Up @@ -226,7 +229,7 @@ func TestAMQPRepublishBuried(t *testing.T) {
}

func TestReconnect(t *testing.T) {
if !dockerIsRunning {
if inAppVeyor || !dockerIsRunning {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t.Skip()
}

Expand Down
20 changes: 11 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
version: "{build}"
image: Visual Studio 2017
platform: x64

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

environment:
GOPATH: c:\gopath
RABBITMQ_VERSION: any

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

build_script:
- set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
- go version
- go get -v -t ./...
install:
- 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"
- mingw32-make ci-install

test_script:
- go test -v ./...
- mingw32-make test

build: off
deploy: off