diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..5ec6f52 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,49 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Go + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + go: + - '1.20' + - '1.19' + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go }} + + - name: Build + run: go build + + - name: Test + run: go test -v -coverprofile=profile.cov + + - name: coveralls.io + uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: profile.cov + flag-name: Go-${{ matrix.go }} + parallel: true + + finish: + needs: test + runs-on: ubuntu-latest + steps: + - uses: shogo82148/actions-goveralls@v1 + with: + parallel-finished: true + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a3b967d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: go -sudo: false - -os: - - linux - - windows - -go: - - "1.15" - - "1.16" - - "1.17" - -before_install: - - go get github.com/mattn/goveralls - - go mod vendor - -script: - - $GOPATH/bin/goveralls -service=travis-pro -race -show -package github.com/go-cmd/cmd