Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .bine.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
"url": "https://github.com/psampaz/go-mod-outdated",
"version": "0.9.0",
"asset_pattern": "{name}_{version}_{os}_{arch}.tar.gz"
},
{
"name": "gotestsum",
"url": "https://github.com/gotestyourself/gotestsum",
"version": "1.13.0",
"asset_pattern": "{name}_{version}_{goos}_{goarch}.tar.gz"
}
]
}
20 changes: 20 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Validate this file:
# curl --data-binary @codecov.yml https://codecov.io/validate

comment: off

coverage:
precision: 2
round: down
range: "25...75"
status:
project:
default:
threshold: 1.0%
patch:
default:
threshold: 1.0%

ignore:
- "internal/**/gen/"
- "internal/database/migrations/"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
/covreport

# Application assets.
config.json
Expand Down
8 changes: 7 additions & 1 deletion .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"default": true,


// Allow inline HTML elements.
"MD033": false,

// Allow fist line to be an HTML element.
"MD041": false,

// Allow indented code blocks.
"MD046": false
}
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ endif
# Configure bine.
export PATH := $(shell go tool bine path):$(PATH)

IGNORED_PACKAGES := \
github.com/artefactual-labs/migrate/internal/database/gen/% \
github.com/artefactual-labs/migrate/internal/database/migrations
PACKAGES = $(shell go list ./...)
TEST_PACKAGES = $(filter-out $(IGNORED_PACKAGES),$(PACKAGES))

build: # @HELP Build migrate.
env CGO_ENABLED=0 go build -trimpath -o $(CURDIR)/migrate ./cmd/migrate

Expand Down Expand Up @@ -56,6 +62,17 @@ lint: LINT_FLAGS ?= --fix=1
lint: tool-golangci-lint
golangci-lint run $(LINT_FLAGS)

test: # @HELP Run all tests and output a summary using gotestsum.
test: TFORMAT ?= short
test: GOTEST_FLAGS ?=
test: COMBINED_FLAGS ?= $(GOTEST_FLAGS) $(TEST_PACKAGES)
test: tool-gotestsum
gotestsum --format=$(TFORMAT) -- $(COMBINED_FLAGS)

test-ci: # @HELP Run all tests in CI with coverage and the race detector.
test-ci:
$(MAKE) test GOTEST_FLAGS="-race -coverprofile=covreport -covermode=atomic"

tool-%:
@go tool bine get $* 1> /dev/null

Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<p align="left">
<a href="LICENSE">
<img alt="Apache License 2.0" src="https://img.shields.io/badge/license-Apache%202.0-blue.svg"/>
</a>
<a href="https://codecov.io/gh/artefactual-labs/migrate">
<img alt="Migrate project" src="https://img.shields.io/codecov/c/github/artefactual-labs/migrate"/>
</a>
</p>

# Migrate

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