Skip to content

Commit

Permalink
root : update circle config
Browse files Browse the repository at this point in the history
  • Loading branch information
antham committed May 13, 2020
1 parent 73100f7 commit 0b78fe4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: circleci/golang:1.12
- image: circleci/golang:1.14
working_directory: /go/src/github.com/antham/chyle
environment:
BASH_ENV: /home/circleci/.bashrc
Expand All @@ -11,18 +11,18 @@ jobs:
- run:
name: Install dependencies
command: |
export GO111MODULE=on
wget -O doc-hunt https://github.com/antham/doc-hunt/releases/download/v2.1.1/doc-hunt_linux_amd64
sudo mv doc-hunt /usr/local/bin
sudo chmod 777 /usr/local/bin/doc-hunt
wget -O gommit https://github.com/antham/gommit/releases/download/v2.1.1/gommit_linux_386
sudo mv gommit /usr/local/bin
sudo chmod 777 /usr/local/bin/gommit
go get -u github.com/mitchellh/gox
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
go get -u github.com/mitchellh/gox@v1.0.1
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/local/bin v1.27.0
- run:
name: Install vendors
command: |
export GO111MODULE=on
go mod vendor
- run:
name: Run tests
Expand All @@ -46,7 +46,7 @@ jobs:
publish:
docker:
- image: circleci/golang:1.12
- image: circleci/golang:1.14
working_directory: /go/src/github.com/antham/chyle
steps:
- checkout
Expand All @@ -57,15 +57,15 @@ jobs:
- run:
name: Install dependencies
command: |
export GO111MODULE=on
mkdir /home/circleci/bin
go get -u github.com/mitchellh/gox
go get -u github.com/tcnksm/ghr
go get -u github.com/mitchellh/gox@v1.0.1
go get -u github.com/tcnksm/ghr@v0.13.0
wget -O ~/bin/chyle https://github.com/antham/chyle/releases/download/v1.2.0/chyle_linux_amd64
chmod 777 ~/bin/chyle
- run:
name: Install vendors
command: |
export GO111MODULE=on
go mod vendor
- run:
name: Compile
Expand Down
4 changes: 2 additions & 2 deletions chyle/senders/custom_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func TestCustomAPIWithWrongCredentials(t *testing.T) {

err := s.Send(&c)

assert.EqualError(t, err, `can't call custom api to send release : Post https://test.com/releases: {"error":"You don't have correct credentials"}`)
assert.EqualError(t, err, `can't call custom api to send release : Post "https://test.com/releases": {"error":"You don't have correct credentials"}`)
assert.True(t, gock.IsDone(), "Must have no pending requests")
}

Expand All @@ -95,6 +95,6 @@ func TestCustomAPIWithWrongURL(t *testing.T) {

err := s.Send(&c)

assert.EqualError(t, err, `can't call custom api to send release : parse :test: missing protocol scheme`)
assert.EqualError(t, err, `can't call custom api to send release : parse ":test": missing protocol scheme`)
assert.True(t, gock.IsDone(), "Must have no pending requests")
}
4 changes: 2 additions & 2 deletions chyle/senders/github_release_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func TestGithubReleaseCreateReleaseWithWrongCredentials(t *testing.T) {

err := s.Send(&c)

assert.EqualError(t, err, "can't create github release : Post https://api.github.com/repos/test/test/releases: an error occurred", "Must return an error when api response something wrong")
assert.EqualError(t, err, `can't create github release : Post "https://api.github.com/repos/test/test/releases": an error occurred`, "Must return an error when api response something wrong")
assert.True(t, gock.IsDone(), "Must have no pending requests")
}

Expand Down Expand Up @@ -178,6 +178,6 @@ func TestGithubReleaseUpdateReleaseWithWrongCredentials(t *testing.T) {

err := s.Send(&c)

assert.EqualError(t, err, "can't retrieve github release v1.0.0 : Get https://api.github.com/repos/test/test/releases/tags/v1.0.0: an error occurred")
assert.EqualError(t, err, `can't retrieve github release v1.0.0 : Get "https://api.github.com/repos/test/test/releases/tags/v1.0.0": an error occurred`)
assert.True(t, gock.IsDone(), "Must have no pending requests")
}

0 comments on commit 0b78fe4

Please sign in to comment.