Skip to content

Commit

Permalink
add race detect flag for tests fix crossplane#256 and fix makefile fo…
Browse files Browse the repository at this point in the history
…r legacy chart

Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
  • Loading branch information
wonderflow committed Nov 11, 2020
1 parent 09203f4 commit c0064da
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@ jobs:
- name: Vendor Dependencies
run: make vendor vendor.check


- name: Build Legacy Helm Chart
run: make prepare-legacy-chart


- name: Check Diff
run: make check-diff

Expand Down Expand Up @@ -164,7 +159,6 @@ jobs:
- name: Build Legacy Helm Chart
run: make prepare-legacy-chart


- name: Build Helm Chart
run: make -j2 build
env:
Expand Down Expand Up @@ -224,11 +218,9 @@ jobs:
- name: Vendor Dependencies
run: make vendor vendor.check


- name: Build Legacy Helm Chart
run: make prepare-legacy-chart


- name: Build Artifacts
run: make -j2 build.all
env:
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ NPROCS ?= 1
# parallel can lead to high CPU utilization. by default we reduce the parallelism
# to half the number of CPU cores.
GO_TEST_PARALLEL := $(shell echo $$(( $(NPROCS) / 2 )))
GO_TEST_FLAGS += -race
GO_COVER_MODE = atomic
GO_CGO_ENABLED = 1

GO_INTEGRATION_TESTS_SUBDIRS = test

Expand Down Expand Up @@ -88,7 +91,7 @@ cobertura:
$(GOCOVER_COBERTURA) > $(GO_TEST_OUTPUT)/cobertura-coverage.xml

# Ensure a PR is ready for review.
reviewable: generate lint
reviewable: prepare-legacy-chart generate lint
@go mod tidy

# Ensure branch is clean.
Expand Down Expand Up @@ -165,5 +168,5 @@ e2e-cleanup:
e2e: e2e-setup e2e-test go-integration

prepare-legacy-chart:
rsync -r $(LEGACY_HELM_CHART_DIR)/$(LEGACY_HELM_CHART) $(HELM_CHARTS_DIR)
rm -r $(HELM_CHARTS_DIR)/$(LEGACY_HELM_CHART) && cp -r $(LEGACY_HELM_CHART_DIR)/$(LEGACY_HELM_CHART) $(HELM_CHARTS_DIR)/
rsync -r $(HELM_CHARTS_DIR)/$(HELM_CHART)/* $(HELM_CHARTS_DIR)/$(LEGACY_HELM_CHART) --exclude=Chart.yaml --exclude=crds
2 changes: 1 addition & 1 deletion apis/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ limitations under the License.
//go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd:crdVersions=v1 output:artifacts:config=../charts/oam-kubernetes-runtime/crds

// Generate legacy_support for K8s 1.12~1.15 versions CRD manifests
//go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd:trivialVersions=true output:artifacts:config=../legacy/crds
//go:generate go run -tags generate sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=../hack/boilerplate.go.txt paths=./... crd:trivialVersions=true output:artifacts:config=../legacy/charts/oam-kubernetes-runtime-legacy/crds
//go:generate go run ../legacy/convert/main.go ../legacy/charts/oam-kubernetes-runtime-legacy/crds

package apis
Expand Down
2 changes: 1 addition & 1 deletion build

0 comments on commit c0064da

Please sign in to comment.