Merge pull request #2236 from samalba/ci-gotest
ci: run go unit tests from the dagger plan
This commit is contained in:
commit
4bef4829aa
6
Makefile
6
Makefile
@ -29,8 +29,8 @@ install: # Install a dev dagger binary
|
|||||||
go install -ldflags '-X go.dagger.io/dagger/version.Revision=$(GIT_REVISION)' ./cmd/dagger
|
go install -ldflags '-X go.dagger.io/dagger/version.Revision=$(GIT_REVISION)' ./cmd/dagger
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: # Run all tests
|
test: dagger # Run all tests
|
||||||
go test -race -v ./...
|
./cmd/dagger/dagger do test
|
||||||
|
|
||||||
.PHONY: golint
|
.PHONY: golint
|
||||||
golint: dagger # Go lint
|
golint: dagger # Go lint
|
||||||
@ -90,4 +90,4 @@ web: # Run the website locally
|
|||||||
|
|
||||||
.PHONY: todo
|
.PHONY: todo
|
||||||
todo: # Find all TODO items
|
todo: # Find all TODO items
|
||||||
grep -r -A 1 "TODO:" $(CURDIR)
|
grep -r -A 1 "TODO:" $(CURDIR)
|
||||||
|
8
ci.cue
8
ci.cue
@ -73,13 +73,7 @@ dagger.#Plan & {
|
|||||||
source: _source
|
source: _source
|
||||||
package: "./..."
|
package: "./..."
|
||||||
|
|
||||||
// FIXME: doesn't work with CGO_ENABLED=0
|
command: flags: "-race": true
|
||||||
// command: flags: "-race": true
|
|
||||||
|
|
||||||
env: {
|
|
||||||
// FIXME: removing this complains about lack of gcc
|
|
||||||
CGO_ENABLED: "0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lint: {
|
lint: {
|
||||||
|
@ -13,7 +13,11 @@ _#DefaultVersion: "1.18"
|
|||||||
|
|
||||||
packages: [pkgName=string]: version: string | *""
|
packages: [pkgName=string]: version: string | *""
|
||||||
// FIXME Remove once golang image include 1.18 *or* go compiler is smart with -buildvcs
|
// FIXME Remove once golang image include 1.18 *or* go compiler is smart with -buildvcs
|
||||||
packages: git: _
|
packages: {
|
||||||
|
git: _
|
||||||
|
// For GCC and other possible build dependencies
|
||||||
|
"alpine-sdk": _
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME Basically a copy of alpine.#Build with a different image
|
// FIXME Basically a copy of alpine.#Build with a different image
|
||||||
// Should we create a special definition?
|
// Should we create a special definition?
|
||||||
|
Reference in New Issue
Block a user