mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-31 19:52:26 -05:00
Grand test fixup (#138)
* start fixing up tests * fix up tests + automate with drone * fiddle with linting * messing about with drone.yml * some more fiddling * hmmm * add cache * add vendor directory * verbose * ci updates * update some little things * update sig
This commit is contained in:
parent
329a5e8144
commit
98263a7de6
2677 changed files with 1090869 additions and 219 deletions
39
vendor/github.com/leodido/go-urn/makefile
generated
vendored
Normal file
39
vendor/github.com/leodido/go-urn/makefile
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
SHELL := /bin/bash
|
||||
|
||||
build: machine.go
|
||||
|
||||
images: docs/urn.png
|
||||
|
||||
machine.go: machine.go.rl
|
||||
ragel -Z -G2 -e -o $@ $<
|
||||
@sed -i '/^\/\/line/d' $@
|
||||
@$(MAKE) -s file=$@ snake2camel
|
||||
@gofmt -w -s $@
|
||||
|
||||
docs/urn.dot: machine.go.rl
|
||||
@mkdir -p docs
|
||||
ragel -Z -e -Vp $< -o $@
|
||||
|
||||
docs/urn.png: docs/urn.dot
|
||||
dot $< -Tpng -o $@
|
||||
|
||||
.PHONY: bench
|
||||
bench: *_test.go machine.go
|
||||
go test -bench=. -benchmem -benchtime=5s ./...
|
||||
|
||||
.PHONY: tests
|
||||
tests: *_test.go machine.go
|
||||
go test -race -timeout 10s -coverprofile=coverage.out -covermode=atomic -v ./...
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@rm -rf docs
|
||||
@rm -f machine.go
|
||||
|
||||
.PHONY: snake2camel
|
||||
snake2camel:
|
||||
@awk -i inplace '{ \
|
||||
while ( match($$0, /(.*)([a-z]+[0-9]*)_([a-zA-Z0-9])(.*)/, cap) ) \
|
||||
$$0 = cap[1] cap[2] toupper(cap[3]) cap[4]; \
|
||||
print \
|
||||
}' $(file)
|
||||
Loading…
Add table
Add a link
Reference in a new issue