mirror of https://github.com/databricks/cli.git
separate stages on github to view timings
This commit is contained in:
parent
a1dad6813c
commit
bc6fa65a59
|
@ -96,6 +96,12 @@ jobs:
|
||||||
make vendor
|
make vendor
|
||||||
pip3 install wheel
|
pip3 install wheel
|
||||||
|
|
||||||
|
- name: Build changecalc
|
||||||
|
run: make changecalc/changecalc
|
||||||
|
|
||||||
|
- name: Calculate affected packages
|
||||||
|
run: make viewchanges
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: make testchanges
|
run: make testchanges
|
||||||
|
|
||||||
|
|
15
Makefile
15
Makefile
|
@ -20,13 +20,14 @@ testonly:
|
||||||
@echo "✓ Running tests ..."
|
@echo "✓ Running tests ..."
|
||||||
@gotestsum --format pkgname-and-test-fails --no-summary=skipped --raw-command go test -v -json -short -coverprofile=coverage.txt ./...
|
@gotestsum --format pkgname-and-test-fails --no-summary=skipped --raw-command go test -v -json -short -coverprofile=coverage.txt ./...
|
||||||
|
|
||||||
viewchanges: changecalc/changecalc
|
viewchanges: affected-packages.txt
|
||||||
@changecalc/changecalc
|
@cat affected-packages.txt
|
||||||
|
|
||||||
testchanges: changecalc/changecalc
|
affected-packages.txt: changecalc/changecalc
|
||||||
@echo "✓ Running tests based on changes relative to main..."
|
changecalc/changecalc > affected-packages.txt || echo "./..." > affected-packages.txt
|
||||||
changecalc/changecalc > changed-packages.txt || echo "./..." > changed-packages.txt
|
|
||||||
xargs gotestsum --format pkgname-and-test-fails --no-summary=skipped --raw-command go test -v -json -short -coverprofile=coverage.txt < changed-packages.txt
|
testchanges: affected-packages.txt
|
||||||
|
xargs gotestsum --format pkgname-and-test-fails --no-summary=skipped --raw-command go test -v -json -short -coverprofile=coverage.txt < affected-packages.txt
|
||||||
|
|
||||||
changecalc/changecalc: changecalc/*.go
|
changecalc/changecalc: changecalc/*.go
|
||||||
@go build -o changecalc/changecalc changecalc/main.go
|
@go build -o changecalc/changecalc changecalc/main.go
|
||||||
|
@ -48,4 +49,4 @@ vendor:
|
||||||
@go mod vendor
|
@go mod vendor
|
||||||
|
|
||||||
|
|
||||||
.PHONY: build vendor coverage test lint fmt viewchanges testchanges
|
.PHONY: build vendor coverage test lint fmt viewchanges testchanges affected-packages.txt
|
||||||
|
|
Loading…
Reference in New Issue