refactor: use make in CI, pull module in make docs
Instead of duplicating test logic in both the CI and the Makefile, I made the CI call the Makefile. Also, updated `make docs` so it dynamically pulls the module name from `go list -m`.
This commit is contained in:
@@ -34,7 +34,7 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Run unit tests
|
||||
run: go test ./... -cover -v
|
||||
run: name test-unit
|
||||
|
||||
fuzz-test:
|
||||
name: Fuzz Tests
|
||||
@@ -47,10 +47,7 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Run fuzz tests
|
||||
run: |
|
||||
for func in $(grep -r --include='*_test.go' -oh 'func Fuzz\w*' . | sed 's/func //'); do
|
||||
go test ./... -fuzz="^${func}$" -fuzztime=30s
|
||||
done
|
||||
run: make test-fuzz
|
||||
|
||||
mutation-test:
|
||||
name: Mutation Tests
|
||||
@@ -66,4 +63,4 @@ jobs:
|
||||
run: go install github.com/go-gremlins/gremlins/cmd/gremlins@latest
|
||||
|
||||
- name: Run mutation tests
|
||||
run: gremlins unleash
|
||||
run: make test-mutation
|
||||
|
||||
Reference in New Issue
Block a user