| 1 | # libseccomp-golang |
| 2 | |
| 3 | .PHONY: all check check-build check-syntax fix-syntax vet test lint |
| 4 | |
| 5 | all: check-build |
| 6 | |
| 7 | check: lint test |
| 8 | |
| 9 | check-build: |
| 10 | go build |
| 11 | |
| 12 | check-syntax: |
| 13 | gofmt -d . |
| 14 | |
| 15 | fix-syntax: |
| 16 | gofmt -w . |
| 17 | |
| 18 | vet: |
| 19 | go vet -v ./... |
| 20 | |
| 21 | # Previous bugs have made the tests freeze until the timeout. Golang default |
| 22 | # timeout for tests is 10 minutes, which is too long, considering current tests |
| 23 | # can be executed in less than 1 second. Reduce the timeout, so problems can |
| 24 | # be noticed earlier in the CI. |
| 25 | TEST_TIMEOUT=10s |
| 26 | |
| 27 | test: |
| 28 | go test -v -timeout $(TEST_TIMEOUT) |
| 29 | |
| 30 | lint: |
| 31 | golangci-lint run . |