diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..f485dff --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,20 @@ +name: Build and Test + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + go: [ '1.11', '1.12', '1.13' ] + name: Go Version ${{ matrix.go }} + steps: + - uses: actions/checkout@v4 + - name: Setup go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go }} + - run: go install . + - run: go test ./... diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c9b96e5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: go - -go: - - 1.7.x - - 1.8.x - - 1.x - - master -script: - - go test ./... diff --git a/embedmd/command_test.go b/embedmd/command_test.go index 84e2ce8..da978cc 100644 --- a/embedmd/command_test.go +++ b/embedmd/command_test.go @@ -112,6 +112,7 @@ func eqPtr(a, b *string) bool { } func eqErr(t *testing.T, id string, err error, msg string) bool { + t.Helper() if err == nil && msg == "" { return true } diff --git a/go.mod b/go.mod index cd01135..ca9be07 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module github.com/campoy/embedmd +go 1.11 + require github.com/pmezard/go-difflib v1.0.0