Skip to content

Commit

Permalink
chore: Lint UI on CI, test diagnostics, skip bad test (argoproj#2587)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexec committed Apr 6, 2020
1 parent 232bb11 commit 5191029
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 12 deletions.
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
name: Lint
command: make lint
- run:
name: Check nothing needs commiting
name: Check nothing needs committing
command: git diff --exit-code
e2e-no-db:
working_directory: /home/circleci/.go_workspace/src/github.com/argoproj/argo
Expand Down Expand Up @@ -203,6 +203,9 @@ jobs:
- run:
name: Lint
command: yarn lint
- run:
name: Check nothing needs committing
command: git diff --exit-code
workflows:
version: 2
workflow:
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ ifeq ($(DEV_IMAGE),true)
else
docker build -t $(IMAGE_NAMESPACE)/argocli:$(VERSION) --target argocli --build-arg IMAGE_OS=$(OUTPUT_IMAGE_OS) --build-arg IMAGE_ARCH=$(OUTPUT_IMAGE_ARCH) .
endif
touch dist/cli-image
ifeq ($(K3D),true)
k3d import-images $(IMAGE_NAMESPACE)/argocli:$(VERSION)
endif
touch dist/cli-image

.PHONY: clis
clis: dist/argo-linux-amd64 dist/argo-linux-arm64 dist/argo-linux-ppc64le dist/argo-linux-s390x dist/argo-darwin-amd64 dist/argo-windows-amd64 cli-image
Expand All @@ -175,10 +175,10 @@ ifeq ($(DEV_IMAGE),true)
else
docker build -t $(IMAGE_NAMESPACE)/workflow-controller:$(VERSION) --target workflow-controller --build-arg IMAGE_OS=$(OUTPUT_IMAGE_OS) --build-arg IMAGE_ARCH=$(OUTPUT_IMAGE_ARCH) .
endif
touch dist/controller-image
ifeq ($(K3D),true)
k3d import-images $(IMAGE_NAMESPACE)/workflow-controller:$(VERSION)
endif
touch dist/controller-image

# argoexec

Expand All @@ -200,10 +200,10 @@ ifeq ($(DEV_IMAGE),true)
else
docker build -t $(IMAGE_NAMESPACE)/argoexec:$(VERSION) --target argoexec --build-arg IMAGE_OS=$(OUTPUT_IMAGE_OS) --build-arg IMAGE_ARCH=$(OUTPUT_IMAGE_ARCH) .
endif
touch dist/executor-image
ifeq ($(K3D),true)
k3d import-images $(IMAGE_NAMESPACE)/argoexec:$(VERSION)
endif
touch dist/executor-image

# generation

Expand Down Expand Up @@ -308,8 +308,8 @@ dist/mysql.yaml: test/e2e/manifests/mysql.yaml

.PHONY: install
install: dist/postgres.yaml dist/mysql.yaml dist/no-db.yaml
# Install Postgres quick-start
kubectl get ns argo || kubectl create ns argo
# Install quick-start
kubectl apply -f test/e2e/manifests/argo-ns.yaml
ifeq ($(DB),postgres)
kubectl -n argo apply -f dist/postgres.yaml
else
Expand Down Expand Up @@ -416,8 +416,8 @@ test-api: test-images
.PHONY: test-cli
test-cli: test-images cli
# Run CLI tests
go test -timeout 1m -v -count 1 -p 1 -run CLISuite ./test/e2e
go test -timeout 1m -v -count 1 -p 1 -run CLIWithServerSuite ./test/e2e
go test -timeout 2m -v -count 1 -p 1 -run CLISuite ./test/e2e
go test -timeout 2m -v -count 1 -p 1 -run CLIWithServerSuite ./test/e2e

# clean

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ require (
golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d
golang.org/x/net v0.0.0-20200301022130-244492dfa37a
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/tools v0.0.0-20200402223321-bcf690261a44 // indirect
golang.org/x/tools v0.0.0-20200406144418-7db14c95bfa9 // indirect
google.golang.org/api v0.20.0
google.golang.org/genproto v0.0.0-20200317114155-1f3552e48f24
google.golang.org/grpc v1.28.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,8 @@ golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapK
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200317043434-63da46f3035e/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
golang.org/x/tools v0.0.0-20200402223321-bcf690261a44 h1:bMm0eoDiGkM5VfIyKjxDvoflW5GLp7+VCo+60n8F+TE=
golang.org/x/tools v0.0.0-20200402223321-bcf690261a44/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200406144418-7db14c95bfa9 h1:x1NqUANu/2F4ZM6DIb1XVoaVOdx+P9iQkS9SkO5OBEs=
golang.org/x/tools v0.0.0-20200406144418-7db14c95bfa9/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
1 change: 1 addition & 0 deletions test/e2e/fixtures/then.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ func (t *Then) expectAuditEvents(block func(*testing.T, []apiv1.Event)) *Then {
}
var events []apiv1.Event
for _, e := range eventList.Items {
t.diagnostics.Log(log.Fields{"event": e}, "Events")
if e.Namespace == Namespace && e.InvolvedObject.Kind == workflow.WorkflowKind {
events = append(events, e)
}
Expand Down
4 changes: 4 additions & 0 deletions test/e2e/manifests/argo-ns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
kind: Namespace
apiVersion: v1
metadata:
name: argo
2 changes: 1 addition & 1 deletion workflow/controller/operator_template_scope_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ spec:
`

func TestTemplateClusterScope(t *testing.T) {
//t.SkipNow()
t.SkipNow()
controller := newController()
wfcset := controller.wfclientset.ArgoprojV1alpha1().Workflows("default")
wfctmplset := controller.wfclientset.ArgoprojV1alpha1().ClusterWorkflowTemplates()
Expand Down

0 comments on commit 5191029

Please sign in to comment.