Skip to content

Commit adb7386

Browse files
authored
Merge pull request #33 from alexflint/use-github-actions
Switch from travis to Github actions for CI
2 parents a509d07 + 21759e5 commit adb7386

File tree

5 files changed

+65
-5
lines changed

5 files changed

+65
-5
lines changed

.github/workflows/go.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
11+
build_and_test:
12+
name: Build and test
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
go: ['1.13', '1.14', '1.15', '1.16']
19+
20+
steps:
21+
- id: go
22+
name: Set up Go
23+
uses: actions/setup-go@v1
24+
with:
25+
go-version: ${{ matrix.go }}
26+
27+
- name: Checkout
28+
uses: actions/checkout@v2
29+
30+
- name: Build
31+
run: go build -v .
32+
33+
- name: Test
34+
run: go test -v -coverprofile=profile.cov .
35+
36+
- name: Send coverage
37+
run: bash <(curl -s https://codecov.io/bash) -f profile.cov

.travis.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
[![GoDoc](https://godoc.org/github.com/alexflint/go-restructure?status.svg)](https://godoc.org/github.com/alexflint/go-restructure)
2-
[![Build Status](https://travis-ci.org/alexflint/go-restructure.svg?branch=master)](https://travis-ci.org/alexflint/go-restructure)
1+
<h4 align="center">Struct-based argument parsing for Go</h4>
2+
<p align="center">
3+
<a href="https://pkg.go.dev/github.com/alexflint/go-restructure"><img src="https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square" alt="Documentation"></a>
4+
<a href="https://github.com/alexflint/go-restructure/actions"><img src="https://github.com/alexflint/go-restructure/workflows/Go/badge.svg" alt="Build Status"></a>
5+
<a href="https://codecov.io/gh/alexflint/go-restructure"><img src="https://codecov.io/gh/alexflint/go-restructure/branch/master/graph/badge.svg" alt="Coverage Status"></a>
6+
<a href="https://goreportcard.com/report/github.com/alexflint/go-restructure"><img src="https://goreportcard.com/badge/github.com/alexflint/go-restructure" alt="Go Report Card"></a>
7+
</p>
8+
<br>
39

410
## Match regular expressions into struct fields
511

go.mod

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module github.com/alexflint/go-restruture
2+
3+
go 1.15
4+
5+
require (
6+
github.com/alexflint/go-restructure v0.0.0-20160131054339-a509d071de28
7+
github.com/stretchr/testify v1.7.0
8+
)

go.sum

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
github.com/alexflint/go-restructure v0.0.0-20160131054339-a509d071de28 h1:p32gFVhF4WnI/qpSpZ0//GGb6BAAFLVnkd4Vowg7im8=
2+
github.com/alexflint/go-restructure v0.0.0-20160131054339-a509d071de28/go.mod h1:8Mq15S+jJn5TWrSU0Ua7L8rFWmY06lu0UCbhJrrcGBY=
3+
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
4+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
6+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
8+
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
9+
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
10+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
11+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
12+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 commit comments

Comments
 (0)