-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from circleci/CIRCLE-11151/setup_ci
Circle 11151/setup ci
- Loading branch information
Showing
212 changed files
with
188,079 additions
and
32 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
version: 2 | ||
|
||
workflows: | ||
version: 2 | ||
ci: | ||
jobs: | ||
- test | ||
- lint | ||
|
||
jobs: | ||
test: | ||
docker: | ||
- image: circleci/golang:1.10 | ||
working_directory: /go/src/github.com/circleci/circleci-cli | ||
steps: | ||
- checkout | ||
- run: make test | ||
lint: | ||
docker: | ||
- image: circleci/golang:1.10 | ||
working_directory: /go/src/github.com/circleci/circleci-cli | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install | ||
command: | | ||
go get -u github.com/alecthomas/gometalinter | ||
gometalinter --install | ||
- run: make lint |
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 @@ | ||
build/ | ||
TODO | ||
circleci-cli |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package main_test | ||
|
||
import ( | ||
"testing" | ||
|
||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
"github.com/onsi/gomega/gexec" | ||
) | ||
|
||
var pathCLI string | ||
|
||
var _ = BeforeSuite(func() { | ||
var err error | ||
pathCLI, err = gexec.Build("github.com/circleci/circleci-cli") | ||
Ω(err).ShouldNot(HaveOccurred()) | ||
}) | ||
|
||
var _ = AfterSuite(func() { | ||
gexec.CleanupBuildArtifacts() | ||
}) | ||
|
||
func TestCircleciCli(t *testing.T) { | ||
RegisterFailHandler(Fail) | ||
RunSpecs(t, "CircleciCli Suite") | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package main_test | ||
|
||
import ( | ||
"os/exec" | ||
|
||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
"github.com/onsi/gomega/gbytes" | ||
"github.com/onsi/gomega/gexec" | ||
) | ||
|
||
var _ = Describe("Main", func() { | ||
Describe("when run with --help", func() { | ||
It("return exit code 0 with help message", func() { | ||
command := exec.Command(pathCLI, "--help") | ||
session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter) | ||
Expect(err).ShouldNot(HaveOccurred()) | ||
Eventually(session).Should(gexec.Exit(0)) | ||
Eventually(session.Out).Should(gbytes.Say("Usage:")) | ||
Eventually(session.Err.Contents()).Should(BeEmpty()) | ||
}) | ||
}) | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.