Skip to content

Commit

Permalink
refactor test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
azr committed Feb 3, 2020
1 parent eeb5774 commit 68349bf
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,38 @@ commands:
default: go
steps:
- run: cd << parameters.FOLDER >> && << parameters.GO >> env && << parameters.GO >> test .

go-tests:
parameters:
GO:
type: string
default: go
steps:
- go-test:
GO: << parameters.GO >>
FOLDER: filesystem
- go-test:
GO: << parameters.GO >>
FOLDER: crypto
- go-test:
GO: << parameters.GO >>
FOLDER: cidr
jobs:
test-linux:
executor: golang
working_directory: /go/src/github.com/hashicorp/go-cty-funcs
steps:
- checkout
- go-test:
FOLDER: /go/src/github.com/hashicorp/go-cty-funcs/filesystem
- go-test:
FOLDER: /go/src/github.com/hashicorp/go-cty-funcs/crypto
- go-test:
FOLDER: /go/src/github.com/hashicorp/go-cty-funcs/cidr
- go-tests

test-darwin:
executor: darwin
working_directory: ~/go/src/github.com/hashicorp/go-cty-funcs
steps:
- checkout
- install-go-unix:
GOOS: darwin
- go-test:
GO: ~/goroot/go/bin/go
FOLDER: ~/go/src/github.com/hashicorp/go-cty-funcs/filesystem
- go-test:
GO: ~/goroot/go/bin/go
FOLDER: ~/go/src/github.com/hashicorp/go-cty-funcs/crypto
- go-test:
- go-tests:
GO: ~/goroot/go/bin/go
FOLDER: ~/go/src/github.com/hashicorp/go-cty-funcs/cidr
test-windows:
executor:
name: win/vs2019
Expand All @@ -74,14 +77,7 @@ jobs:
steps:
- checkout
- install-go-windows
- go-test:
FOLDER: ~/go/src/github.com/hashicorp/go-cty-funcs/filesystem
GO: ~/goroot/go/bin/go
- go-test:
FOLDER: ~/go/src/github.com/hashicorp/go-cty-funcs/crypto
GO: ~/goroot/go/bin/go
- go-test:
FOLDER: ~/go/src/github.com/hashicorp/go-cty-funcs/cidr
- go-tests:
GO: ~/goroot/go/bin/go
check-fmt:
executor: golang
Expand Down

0 comments on commit 68349bf

Please sign in to comment.