forked from DMarby/picsum-photos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (26 loc) · 775 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.PHONY: fmt test vet install integration package publish fixtures generate_fixtures docker_fixtures
all: test vet install
fmt:
go fmt ./...
test:
go test ./...
integration:
go test -tags integration ./...
vet:
go vet ./...
install:
go install ./...
package:
docker build . -t dmarby/picsum-photos:latest
publish: package
docker push dmarby/picsum-photos:latest
fixtures: generate_fixtures
docker run --rm -v $(PWD):/picsum-photos golang:1.14-alpine sh -c 'apk add make && cd /picsum-photos && make docker_fixtures generate_fixtures'
generate_fixtures:
GENERATE_FIXTURES=1 go test ./... -run '^(TestFixtures)$$'
docker_fixtures:
apk add --update --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing vips-dev
apk add \
git \
gcc \
musl-dev