Skip to content

Commit 9f90ef2

Browse files
committed
Add codecov report
1 parent 38d4860 commit 9f90ef2

File tree

6 files changed

+60
-1
lines changed

6 files changed

+60
-1
lines changed

.bine.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
"url": "https://github.com/psampaz/go-mod-outdated",
2929
"version": "0.9.0",
3030
"asset_pattern": "{name}_{version}_{os}_{arch}.tar.gz"
31+
},
32+
{
33+
"name": "gotestsum",
34+
"url": "https://github.com/gotestyourself/gotestsum",
35+
"version": "1.13.0",
36+
"asset_pattern": "{name}_{version}_{goos}_{goarch}.tar.gz"
3137
}
3238
]
3339
}

.codecov.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Validate this file:
2+
# curl --data-binary @codecov.yml https://codecov.io/validate
3+
4+
comment: off
5+
6+
coverage:
7+
precision: 2
8+
round: down
9+
range: "25...75"
10+
status:
11+
project:
12+
default:
13+
threshold: 1.0%
14+
patch:
15+
default:
16+
threshold: 1.0%
17+
18+
ignore:
19+
- "internal/**/gen/"
20+
- "internal/database/migrations/"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea
2+
/covreport
23

34
# Application assets.
45
config.json

.markdownlint.jsonc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"default": true,
3-
3+
4+
// Allow inline HTML elements.
5+
"MD033": false,
6+
7+
// Allow fist line to be an HTML element.
8+
"MD041": false,
9+
410
// Allow indented code blocks.
511
"MD046": false
612
}

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ endif
1616
# Configure bine.
1717
export PATH := $(shell go tool bine path):$(PATH)
1818

19+
IGNORED_PACKAGES := \
20+
github.com/artefactual-labs/migrate/internal/database/gen/% \
21+
github.com/artefactual-labs/migrate/internal/database/migrations
22+
PACKAGES = $(shell go list ./...)
23+
TEST_PACKAGES = $(filter-out $(IGNORED_PACKAGES),$(PACKAGES))
24+
1925
build: # @HELP Build migrate.
2026
env CGO_ENABLED=0 go build -trimpath -o $(CURDIR)/migrate ./cmd/migrate
2127

@@ -56,6 +62,17 @@ lint: LINT_FLAGS ?= --fix=1
5662
lint: tool-golangci-lint
5763
golangci-lint run $(LINT_FLAGS)
5864

65+
test: # @HELP Run all tests and output a summary using gotestsum.
66+
test: TFORMAT ?= short
67+
test: GOTEST_FLAGS ?=
68+
test: COMBINED_FLAGS ?= $(GOTEST_FLAGS) $(TEST_PACKAGES)
69+
test: tool-gotestsum
70+
gotestsum --format=$(TFORMAT) -- $(COMBINED_FLAGS)
71+
72+
test-ci: # @HELP Run all tests in CI with coverage and the race detector.
73+
test-ci:
74+
$(MAKE) test GOTEST_FLAGS="-race -coverprofile=covreport -covermode=atomic"
75+
5976
tool-%:
6077
@go tool bine get $* 1> /dev/null
6178

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
<p align="left">
2+
<a href="LICENSE">
3+
<img alt="Apache License 2.0" src="https://img.shields.io/badge/license-Apache%202.0-blue.svg"/>
4+
</a>
5+
<a href="https://codecov.io/gh/artefactual-labs/migrate">
6+
<img alt="Migrate project" src="https://img.shields.io/codecov/c/github/artefactual-labs/migrate"/>
7+
</a>
8+
</p>
9+
110
# Migrate
211

312
**Migrate** is a command-line tool for orchestrating large-scale **Archivematica

0 commit comments

Comments
 (0)