diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..f499b51 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,39 @@ +name: Go + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + go-version: 1.17 + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... -race -coverprofile=coverage.txt -covermode=atomic + + - name: Upload coverage to Codecov + run: bash <(curl -s https://codecov.io/bash) + + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: latest diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 01c16c4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -dist: bionic -language: go - -go: - - "1.12.x" - - "1.13.x" - -branches: - only: - - master - -after_success: - # only report coverage for go-version 1.11 - - if [[ $TRAVIS_GO_VERSION =~ ^1\.11 ]] ; then bash <(curl -s https://codecov.io/bash) -f all-cover.txt; fi diff --git a/go.mod b/go.mod index a690239..d497743 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/manifoldco/promptui -go 1.12 +go 1.16 require ( github.com/chzyer/logex v1.1.10 // indirect