Skip to content

Commit 6169978

Browse files
authored
Github actions and other updates (#2)
1 parent c0816cd commit 6169978

File tree

5 files changed

+69
-18
lines changed

5 files changed

+69
-18
lines changed

.github/dependabot.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
- package-ecosystem: github-actions
8+
directory: "/"
9+
schedule:
10+
interval: daily

.github/workflows/build.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v3
18+
with:
19+
go-version: 'stable'
20+
21+
- name: Go Format
22+
run: gofmt -s -w . && git diff --exit-code
23+
24+
- name: Go Tidy
25+
run: go mod tidy && git diff --exit-code
26+
27+
- name: Go Mod
28+
run: go mod download
29+
30+
- name: Build
31+
run: go build ./...
32+
33+
- name: Test
34+
run: go test -v -race -shuffle=on ./...

.travis.yml

-9
This file was deleted.

README.md

+23-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
[![Go Report Card](https://goreportcard.com/badge/github.com/go-toolsmith/strparse)](https://goreportcard.com/report/github.com/go-toolsmith/strparse)
2-
[![GoDoc](https://godoc.org/github.com/go-toolsmith/strparse?status.svg)](https://godoc.org/github.com/go-toolsmith/strparse)
3-
[![Build Status](https://travis-ci.org/go-toolsmith/strparse.svg?branch=master)](https://travis-ci.org/go-toolsmith/strparse)
4-
5-
61
# strparse
72

8-
Package strparse provides convenience wrappers around `go/parser` for simple
3+
[![build-img]][build-url]
4+
[![pkg-img]][pkg-url]
5+
[![reportcard-img]][reportcard-url]
6+
[![version-img]][version-url]
7+
8+
Package `strparse` provides convenience wrappers around `go/parser` for simple
99
expression, statement and declaretion parsing from string.
1010

1111
## Installation
1212

13+
Go version 1.16+
14+
1315
```bash
1416
go get github.com/go-toolsmith/strparse
1517
```
@@ -20,8 +22,8 @@ go get github.com/go-toolsmith/strparse
2022
package main
2123

2224
import (
23-
"go-toolsmith/astequal"
24-
"go-toolsmith/strparse"
25+
"github.com/go-toolsmith/astequal"
26+
"github.com/go-toolsmith/strparse"
2527
)
2628

2729
func main() {
@@ -30,5 +32,17 @@ func main() {
3032
y := strparse.Expr(` 1+f( v[0].X ) `)
3133
fmt.Println(astequal.Expr(x, y)) // => true
3234
}
33-
3435
```
36+
37+
## License
38+
39+
[MIT License](LICENSE).
40+
41+
[build-img]: https://github.com/go-toolsmith/strparse/workflows/build/badge.svg
42+
[build-url]: https://github.com/go-toolsmith/strparse/actions
43+
[pkg-img]: https://pkg.go.dev/badge/go-toolsmith/strparse
44+
[pkg-url]: https://pkg.go.dev/github.com/go-toolsmith/strparse
45+
[reportcard-img]: https://goreportcard.com/badge/go-toolsmith/strparse
46+
[reportcard-url]: https://goreportcard.com/report/go-toolsmith/strparse
47+
[version-img]: https://img.shields.io/github/v/release/go-toolsmith/strparse
48+
[version-url]: https://github.com/go-toolsmith/strparse/releases

go.mod

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
module github.com/go-toolsmith/strparse
22

3+
go 1.16
4+
35
require github.com/go-toolsmith/astequal v1.0.0

0 commit comments

Comments
 (0)