diff --git a/.github/workflows/02-test.yaml b/.github/workflows/02-test.yaml new file mode 100644 index 00000000..dda82f63 --- /dev/null +++ b/.github/workflows/02-test.yaml @@ -0,0 +1,37 @@ +name: Tests +on: + pull_request: + push: + tags: + - v* + branches: + - master +permissions: + contents: read + +jobs: + tests: + strategy: + matrix: + go_version: ['1.18', '1.19','oldstable','stable'] + os: [ubuntu-latest] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + with: + persist-credentials: false + - uses: actions/setup-go@v4 + with: + go-version: ${{ matrix.go_version }} + check-latest: true + + - name: Tests + run: go test -v -race -cover -coverprofile=coverage.out -covermode=atomic ./... + + + #- name: Update Coverage + # uses: shogo82148/actions-goveralls@v1 + # with: + # path-to-profile: coverage.out diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 00d04cb9..00000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -sudo: false - -language: go - -go: - - 1.9.x - - 1.10.x - - 1.11.x - - tip - -matrix: - allow_failures: - - go: tip - -install: - - go get golang.org/x/lint/golint - - export PATH=$GOPATH/bin:$PATH - - go install ./... - -script: - - verify/all.sh -v - - go test ./... diff --git a/flag_test.go b/flag_test.go index 58a5d25a..4fd9444a 100644 --- a/flag_test.go +++ b/flag_test.go @@ -1239,7 +1239,7 @@ func TestPrintDefaults(t *testing.T) { got := buf.String() if got != defaultOutput { fmt.Println("\n" + got) - fmt.Println("\n" + defaultOutput) + fmt.Printf("\n" + defaultOutput) t.Errorf("got %q want %q\n", got, defaultOutput) } }