Skip to content

Commit

Permalink
mariadb and actions
Browse files Browse the repository at this point in the history
  • Loading branch information
gavincabbage committed Sep 18, 2019
1 parent ebd7022 commit 925331c
Show file tree
Hide file tree
Showing 44 changed files with 840 additions and 610 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: build
on: [push, pull_request]
jobs:

lint:
name: Lint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Install linter
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint
- name: Run linter
run: golangci-lint run

unit:
name: Unit Tests
runs-on: ubuntu-18.04
matrix:
go-version: [1.12.9, 1.13]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}
- name: Run unit tests
run: go test -v -p 1 -tags=unit -covermode=atomic -timeout=60s ./...

benchmark:
name: Benchmark
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Benchmark
run: go test -run=Benchmark -benchmem -bench=.

integration:
name: Integration Tests
runs-on: ubuntu-18.04
services:
s3:
image: localstack/localstack:latest
env:
- SERVICES=s3
postgres:
image: healthcheck/postgres
env:
- POSTGRES_DB=testdb
- POSTGRES_PASSWORD=password
mariadb:
image: healthcheck/mariadb
env:
- MYSQL_DATABASE=testdb
- MYSQL_ROOT_PASSWORD=password
steps:
- uses: actions/checkout@v1
- name: Run integration tests
run: go test -p 1 -tags=integration -covermode=atomic -timeout=60s ./...
env:
- AWS_ACCESS_KEY_ID=bogus
- AWS_SECRET_KEY=bogus
- AWS_REGION=us-east-1
- AWS_ENDPOINT=http://s3:4572
- POSTGRES_URL=postgres://postgres:password@postgres/testdb?sslmode=disable
- MARIADB_URL=root:password@tcp(mariadb:3306)/testdb?charset=utf8&parseTime=True&loc=Local
11 changes: 0 additions & 11 deletions .github/workflows/go_test.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
push:
tags:
- 'v*'
name: release
jobs:

release:
name: Release
runs-on: ubuntu-latest
needs: [ "go test" ]
steps:
- name: Check out code
uses: actions/checkout@master
- name: Release
uses: docker://goreleaser/goreleaser
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: release
if: success()
2 changes: 0 additions & 2 deletions .gitignore

This file was deleted.

27 changes: 27 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
- go mod tidy
builds:
-
binary: chiv
main: ./cmd/main.go
goos:
- linux
- darwin
- freebsd
- windows
- env:
- CGO_ENABLED=0
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
signs:
- artifacts: checksum
3 changes: 1 addition & 2 deletions test/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GO_VERSION=1.12
ARG GO_VERSION=1.13

FROM golang:${GO_VERSION}-alpine

Expand All @@ -11,6 +11,5 @@ COPY go.mod .
COPY go.sum .

RUN go mod download
RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint

COPY . .
17 changes: 4 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
# chiv

[![Codeship Status for gavincabbage/chiv](https://app.codeship.com/projects/d63650d0-31a3-0137-a334-52c4eded8102/status?branch=master)](https://app.codeship.com/projects/332043)
[![Go Report](https://goreportcard.com/badge/github.com/gavincabbage/chiv)](https://goreportcard.com/report/github.com/gavincabbage/chiv)
[![GoDoc](https://godoc.org/github.com/gavincabbage/chiv?status.svg)](https://godoc.org/github.com/gavincabbage/chiv)
[![License](http://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/gavincabbage/chiv/blob/master/LICENSE)
[![Test Status](https://gavincabbage.com/chiv/workflows/go%20test/badge.svg)](https://gavincabbage.com/chiv/actions)
[![Go Report](https://goreportcard.com/badge/gavincabbage.com/chiv)](https://goreportcard.com/report/gavincabbage.com/chiv)
[![GoDoc](https://godoc.org/gavincabbage.com/chiv?status.svg)](https://godoc.org/gavincabbage.com/chiv)
[![License](http://img.shields.io/badge/License-MIT-blue.svg)](https://gavincabbage.com/chiv/blob/master/LICENSE)

Archive relational database tables to Amazon S3.

## Example

TODO

## CLI

TODO

Loading

0 comments on commit 925331c

Please sign in to comment.