| 1 |
.PHONY: test ci fmtcheck |
| 2 |
|
| 3 |
ci: test fmtcheck |
| 4 |
|
| 5 |
test: fixtures/database-v1 |
| 6 |
@go test -v -race -cover ./... |
| 7 |
@rm -rf fixtures/database-v1 |
| 8 |
|
| 9 |
fmtcheck: |
| 10 |
# Verify that everything is properly gofmt'd. |
| 11 |
@[ -z "$$(gofmt -d .)" ] || ( \ |
| 12 |
gofmt -d . >&2; \ |
| 13 |
echo "Formatting descrepency; did you forget to run gofmt?" >&2; \ |
| 14 |
exit 1 \ |
| 15 |
) |
| 16 |
|
| 17 |
|
| 18 |
fixtures/database-v1: fixtures/database-v1.tar.xz |
| 19 |
@tar -C fixtures -xf fixtures/database-v1.tar.xz |
| 20 |
|
| 21 |
fixtures/database-v1.tar.xz: |
| 22 |
@mkdir -p fixtures |
| 23 |
@curl -Lo fixtures/database-v1.tar.xz http://notmuchmail.org/releases/test-databases/database-v1.tar.xz |