-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize repository, move to circleCI (#17)
* chore: remove semaphore2.0 * chore: reorganize repository. * chore: add circleci * Install Golang for integration tests Signed-off-by: Damien DUPORTAL <[email protected]> * Use same integrartion_test target on CI as dev machines Signed-off-by: Damien DUPORTAL <[email protected]> wip ci Signed-off-by: Damien DUPORTAL <[email protected]> wip ci Signed-off-by: Damien DUPORTAL <[email protected]> wip ci Signed-off-by: Damien DUPORTAL <[email protected]> wip ci Signed-off-by: Damien DUPORTAL <[email protected]> wip ci Signed-off-by: Damien DUPORTAL <[email protected]> * Cleanup leftover of ci_intergation_test target Signed-off-by: Damien DUPORTAL <[email protected]> * use vendor dir on integration tests * update README, add circleCI badge * do not use future for comment
- Loading branch information
Showing
26 changed files
with
267 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,82 @@ | ||
--- | ||
version: 2 | ||
jobs: | ||
build: | ||
cache: | ||
working_directory: ~/sind | ||
docker: | ||
- image: circleci/golang:1.12.1 | ||
environment: | ||
GO111MODULE= "on" | ||
GO111MODULE: "on" | ||
steps: | ||
- checkout | ||
- run: make download | ||
- run: make vendor | ||
- save_cache: | ||
key: sind-{{ .Environment.CIRCLE_SHA1 }} | ||
paths: | ||
- ~/sind | ||
|
||
integration_test: | ||
machine: | ||
enabled: true | ||
working_directory: ~/sind | ||
steps: | ||
- run: | ||
name: Install and Setup Go | ||
command: | | ||
curl -sSfL https://dl.google.com/go/go1.12.1.linux-amd64.tar.gz -o go.tgz | ||
echo "2a3fdabf665496a0db5f41ec6af7a9b15a49fbe71a85a50ca38b1f13a103aeec *go.tgz" | sha256sum -c - | ||
mkdir -p "${HOME}/local" | ||
tar --overwrite -C "${HOME}"/local -xzf go.tgz | ||
rm go.tgz | ||
echo 'export GOPATH="${HOME}"/go' >> "${BASH_ENV}" | ||
echo 'export PATH="${GOPATH}"/bin:"${HOME}"/local/go/bin:$PATH' >> "${BASH_ENV}" | ||
source "${BASH_ENV}" | ||
mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" | ||
- restore_cache: | ||
keys: | ||
- sind-{{ .Environment.CIRCLE_SHA1 }} | ||
- run: | ||
name: Move repository under GOPATH | ||
command: | | ||
source "${BASH_ENV}" | ||
mkdir -p "${GOPATH}/src/github.com/jlevesy" | ||
mv ~/sind "${GOPATH}/src/github.com/jlevesy" | ||
- run: | ||
name: Run Integration Tests | ||
command: | | ||
source "${BASH_ENV}" | ||
cd "${GOPATH}/src/github.com/jlevesy/sind" | ||
make integration_test | ||
working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}} | ||
unit_test: | ||
docker: | ||
- image: circleci/golang:1.12.1 | ||
working_directory: /go/src/github.com/jlevesy/sind | ||
steps: | ||
- run: echo "Success" | ||
- restore_cache: | ||
keys: | ||
- sind-{{ .Environment.CIRCLE_SHA1 }} | ||
- run: mv ~/sind /go/src/github.com/jlevesy | ||
- run: | ||
name: "Install golangci-lint" | ||
command: | | ||
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.15.0 | ||
sudo mv ./bin/golangci-lint $GOPATH/bin | ||
rm -rf ./bin | ||
golangci-lint --version | ||
- run: make lint | ||
- run: make unit_test | ||
- run: make binary | ||
|
||
workflows: | ||
version: 2 | ||
build_and_test: | ||
jobs: | ||
- cache | ||
- unit_test: | ||
requires: | ||
- cache | ||
- integration_test: | ||
requires: | ||
- cache |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
dist/ | ||
.gocache/ | ||
vendor/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.