-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Update go version to 1.17 - Update golangci-lint version to 1.44.2 - Use //go:embed instead of an external embedding tool - Migrate from DoneCI to Github actions
- Loading branch information
Showing
11 changed files
with
69 additions
and
319 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: "migrator build" | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: prepare | ||
run: | | ||
docker compose up -d --build | ||
docker compose exec -T migrator make prepare | ||
- name: sanity-check | ||
run: docker compose exec -T migrator make sanity-check | ||
- name: test | ||
env: | ||
POSTGRES_URL: postgres://postgres:migrator@postgres:5432/migrator?sslmode=disable | ||
MYSQL_URL: root:migrator@tcp(mysql:3306)/migrator | ||
run: | | ||
docker compose exec -T migrator make test POSTGRES_URL="${POSTGRES_URL}" MYSQL_URL="${MYSQL_URL}" | ||
docker compose cp migrator:/go/src/github.com/lopezator/migrator/coverage.txt . | ||
- name: coverage | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
files: ./coverage.txt | ||
- name: clean | ||
run: docker compose down -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ linters: | |
- errcheck | ||
- gocritic | ||
- goimports | ||
- golint | ||
- revive | ||
- govet | ||
- megacheck | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
module github.com/lopezator/migrator | ||
|
||
go 1.15 | ||
go 1.17 | ||
|
||
require ( | ||
github.com/go-sql-driver/mysql v1.4.1 | ||
github.com/jackc/pgx/v4 v4.9.0 | ||
) | ||
|
||
require ( | ||
github.com/jackc/chunkreader/v2 v2.0.1 // indirect | ||
github.com/jackc/pgconn v1.7.0 // indirect | ||
github.com/jackc/pgio v1.0.0 // indirect | ||
github.com/jackc/pgpassfile v1.0.0 // indirect | ||
github.com/jackc/pgproto3/v2 v2.0.5 // indirect | ||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect | ||
github.com/jackc/pgtype v1.5.0 // indirect | ||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect | ||
golang.org/x/text v0.3.3 // indirect | ||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect | ||
google.golang.org/appengine v1.4.0 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.