diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 60a332c..bb50d06 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,36 +12,28 @@ jobs: - macos-latest - windows-latest go: - - '1.7' # minimum version that macos-latest supports - - '1.10' # last version that doesn't support go modules - - '1.11' # first version that supports go modules - - '1.x' # latest version + - '1.13' # minimum version + - 'oldstable' + - 'stable' runs-on: ${{ matrix.os }} steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Set up Go ${{ matrix.go }} - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go }} - run: go version - - name: Set up GOPATH - shell: bash - run: | - echo "GOPATH=${{ github.workspace }}" >> "$GITHUB_ENV" - echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - uses: actions/checkout@v2 - with: - path: src/github.com/mattn/goveralls - ref: ${{ github.event.pull_request.head.sha }} - name: build run: | go get ./... go install . - working-directory: src/github.com/mattn/goveralls - name: test run: goveralls -service=github -parallel -flagname="Unit-${{ matrix.os }}-Go-${{ matrix.go }}" - working-directory: src/github.com/mattn/goveralls env: COVERALLS_TOKEN: ${{ github.token }} GIT_BRANCH: ${{ github.head_ref }} @@ -50,13 +42,11 @@ jobs: needs: test runs-on: ubuntu-latest steps: - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: '1.x' - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} + - name: Set up Go + uses: actions/setup-go@v4 - name: finish run: | go run github.com/mattn/goveralls -parallel-finish diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a6523a0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2022 Yasuhiro Matsumoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 510901a..20c480b 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ continuous code coverage tracking system. # Installation -`goveralls` requires a working Go installation (Go-1.2 or higher). +`goveralls` requires a working Go installation (Go-1.13 or higher). ```bash -$ go get github.com/mattn/goveralls +$ go install github.com/mattn/goveralls@latest ``` @@ -38,7 +38,7 @@ docs](https://docs.coveralls.io/parallel-build-webhook) for more details). There is no need to run `go test` separately, as `goveralls` runs the entire test suite. -## Github Actions +## GitHub Actions [shogo82148/actions-goveralls](https://github.com/marketplace/actions/actions-goveralls) is available on GitHub Marketplace. It provides the shorthand of the GitHub Actions YAML configure. @@ -52,9 +52,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go - uses: actions/setup-go@v1 + uses: actions/setup-go@v2 with: - go-version: '1.13' + go-version: '1.16' - name: Check out code uses: actions/checkout@v2 - name: Install dependencies @@ -64,9 +64,7 @@ jobs: run: | go test -race -covermode atomic -coverprofile=covprofile ./... - name: Install goveralls - env: - GO111MODULE: off - run: go get github.com/mattn/goveralls + run: go install github.com/mattn/goveralls@latest - name: Send coverage env: COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -78,79 +76,34 @@ jobs: # path-to-profile: covprofile ``` -### Test with Legacy GOPATH mode - -If you want to use Go 1.10 or earlier, you have to set `GOPATH` environment value and the working directory. -See for more detail. - -Here is an example for testing `example.com/owner/repo` package. - -```yaml -name: Quality -on: [push, pull_request] -jobs: - test: - name: Test with Coverage - runs-on: ubuntu-latest - steps: - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: '1.10' - - # add this step - - name: Set up GOPATH - run: | - echo "GOPATH=${{ github.workspace }}" >> "$GITHUB_ENV" - echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" - - - name: Check out code - uses: actions/checkout@v2 - with: - path: src/example.com/owner/repo # add this - - name: Run Unit tests - run: | - go test -race -covermode atomic -coverprofile=covprofile ./... - working-directory: src/example.com/owner/repo # add this - - name: Install goveralls - env: - GO111MODULE: off - run: go get github.com/mattn/goveralls - - name: Send coverage - env: - COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: goveralls -coverprofile=covprofile -service=github - working-directory: src/example.com/owner/repo # add this -``` - ## Travis CI ### GitHub Integration -Enable Travis-CI on your github repository settings. +Enable Travis-CI on your GitHub repository settings. -For a **public** github repository put bellow's `.travis.yml`. +For a **public** GitHub repository put bellow's `.travis.yml`. ```yml language: go go: - tip before_install: - - go get github.com/mattn/goveralls + - go install github.com/mattn/goveralls@latest script: - $GOPATH/bin/goveralls -service=travis-ci ``` -For a **public** github repository, it is not necessary to define your repository key (`COVERALLS_TOKEN`). +For a **public** GitHub repository, it is not necessary to define your repository key (`COVERALLS_TOKEN`). -For a **private** github repository put bellow's `.travis.yml`. If you use **travis pro**, you need to specify `-service=travis-pro` instead of `-service=travis-ci`. +For a **private** GitHub repository put bellow's `.travis.yml`. If you use **travis pro**, you need to specify `-service=travis-pro` instead of `-service=travis-ci`. ```yml language: go go: - tip before_install: - - go get github.com/mattn/goveralls + - go install github.com/mattn/goveralls@latest script: - $GOPATH/bin/goveralls -service=travis-pro ``` @@ -179,7 +132,7 @@ env: ### For others: ``` -$ go get github.com/mattn/goveralls +$ go install github.com/mattn/goveralls@latest $ go test -covermode=count -coverprofile=profile.cov $ goveralls -coverprofile=profile.cov -service=travis-ci ``` @@ -195,7 +148,7 @@ COVERALLS_TOKEN=your_token_goes_here Replace the `go test` line in your `Commands` with these lines: ``` -$ go get github.com/mattn/goveralls +$ go install github.com/mattn/goveralls@latest $ goveralls -service drone.io ``` @@ -217,7 +170,7 @@ In your `circle.yml` add the following commands under the `test` section. ```yml test: pre: - - go get github.com/mattn/goveralls + - go install github.com/mattn/goveralls@latest override: - go test -v -cover -race -coverprofile=/home/ubuntu/coverage.out post: @@ -239,7 +192,7 @@ More instructions on how to do this can be found in the [Semaphore documentation Replace the `go test` line in your `Commands` with these lines: ``` -$ go get github.com/mattn/goveralls +$ go install github.com/mattn/goveralls@latest $ goveralls -service semaphore ``` @@ -293,7 +246,7 @@ COVERALLS_TOKEN=your_token_goes_here Setup build steps: ``` -$ go get github.com/mattn/goveralls +$ go install github.com/mattn/goveralls@latest $ export PULL_REQUEST_NUMBER=%teamcity.build.branch% $ goveralls -service teamcity -jobid %teamcity.build.id% -jobnumber %build.number% ``` @@ -320,7 +273,7 @@ test: when: always script: - go test -covermode atomic -coverprofile=coverage.txt ./... - - go get github.com/mattn/goveralls + - go install github.com/mattn/goveralls@latest - goveralls -service=gitlab -coverprofile=coverage.txt ``` diff --git a/go.mod b/go.mod index 661fe67..22d9256 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/mattn/goveralls -go 1.11 +go 1.13 require ( - golang.org/x/mod v0.4.2 - golang.org/x/tools v0.1.1 + golang.org/x/mod v0.10.0 + golang.org/x/tools v0.8.0 ) diff --git a/go.sum b/go.sum index 9ba29a2..d3a6c58 100644 --- a/go.sum +++ b/go.sum @@ -1,27 +1,40 @@ -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= +golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.1 h1:wGiQel/hW0NnEkJUk8lbzkX2gFJU6PFxf1v5OlCfuOs= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= +golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/gocover.go b/gocover.go index ecd1b5d..1c6fdfa 100644 --- a/gocover.go +++ b/gocover.go @@ -16,6 +16,7 @@ import ( "path/filepath" "strings" + "golang.org/x/mod/modfile" "golang.org/x/tools/cover" ) @@ -176,3 +177,12 @@ func parseCover(fn string) ([]*SourceFile, error) { return sourceFiles, nil } + +func findRootPackage(rootDirectory string) string { + modPath := filepath.Join(rootDirectory, "go.mod") + content, err := ioutil.ReadFile(modPath) + if err != nil { + return "" + } + return modfile.ModulePath(content) +} diff --git a/gocover_ge1.8.go b/gocover_ge1.8.go deleted file mode 100644 index 4b880a5..0000000 --- a/gocover_ge1.8.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build go1.8 - -package main - -import ( - "io/ioutil" - "path/filepath" - - "golang.org/x/mod/modfile" -) - -func findRootPackage(rootDirectory string) string { - modPath := filepath.Join(rootDirectory, "go.mod") - content, err := ioutil.ReadFile(modPath) - if err != nil { - return "" - } - return modfile.ModulePath(content) -} diff --git a/gocover_lt1.8.go b/gocover_lt1.8.go deleted file mode 100644 index 263306e..0000000 --- a/gocover_lt1.8.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build !go1.8 - -package main - -func findRootPackage(rootDirectory string) string { - return "" -} diff --git a/goveralls.go b/goveralls.go index 126feb7..fa8c24c 100644 --- a/goveralls.go +++ b/goveralls.go @@ -248,7 +248,9 @@ func processParallelFinish(jobID, token string) error { params := make(url.Values) params.Set("repo_token", token) - params.Set("repo_name", name) + if name != "" { + params.Set("repo_name", name) + } params.Set("payload[build_num]", jobID) params.Set("payload[status]", "done") res, err := http.PostForm(*endpoint+"/webhook", params) @@ -268,12 +270,23 @@ func processParallelFinish(jobID, token string) error { return fmt.Errorf("unable to read response body from coveralls: %s", err) } - if res.StatusCode >= http.StatusInternalServerError && *shallow { - fmt.Println("coveralls server failed internally") - return nil + if *shallow { + if res.StatusCode >= http.StatusInternalServerError { + fmt.Println("coveralls server failed internally") + return nil + } + + // XXX: It looks that Coveralls is under maintenance. + // Coveralls serves the maintenance page as a static HTML hosting, + // and the maintenance page doesn't accept POST method. + // See https://github.com/mattn/goveralls/issues/204 + if res.StatusCode == http.StatusMethodNotAllowed { + fmt.Println("it looks that Coveralls is under maintenance. visit https://status.coveralls.io/") + return nil + } } - if res.StatusCode != 200 { + if res.StatusCode != http.StatusOK { return fmt.Errorf("bad response status from coveralls: %d\n%s", res.StatusCode, bodyBytes) } @@ -379,6 +392,9 @@ func process() error { if prNumber := os.Getenv("CIRCLE_PR_NUMBER"); prNumber != "" { // for Circle CI (pull request from forked repo) pullRequest = prNumber + } else if prURL := os.Getenv("CIRCLE_PULL_REQUEST"); prURL != "" { + // for Circle CI (all other pull requests) + pullRequest = regexp.MustCompile(`[0-9]+$`).FindString(prURL) } else if prNumber := os.Getenv("TRAVIS_PULL_REQUEST"); prNumber != "" && prNumber != "false" { pullRequest = prNumber } else if prNumber := os.Getenv("APPVEYOR_PULL_REQUEST_NUMBER"); prNumber != "" { @@ -502,9 +518,20 @@ func process() error { return fmt.Errorf("unable to read response body from coveralls: %s", err) } - if res.StatusCode >= http.StatusInternalServerError && *shallow { - fmt.Println("coveralls server failed internally") - return nil + if *shallow { + if res.StatusCode >= http.StatusInternalServerError { + fmt.Println("coveralls server failed internally") + return nil + } + + // XXX: It looks that Coveralls is under maintenance. + // Coveralls serves the maintenance page as a static HTML hosting, + // and the maintenance page doesn't accept POST method. + // See https://github.com/mattn/goveralls/issues/204 + if res.StatusCode == http.StatusMethodNotAllowed { + fmt.Println("it looks that Coveralls is under maintenance. visit https://status.coveralls.io/") + return nil + } } if res.StatusCode != 200 { diff --git a/usage_ge1.15_test.go b/usage_ge1.15_test.go index d6e4e08..ea5baf8 100644 --- a/usage_ge1.15_test.go +++ b/usage_ge1.15_test.go @@ -1,3 +1,4 @@ +//go:build go1.15 // +build go1.15 package main diff --git a/usage_lt1.15_test.go b/usage_lt1.15_test.go index 3a54e76..947e3cf 100644 --- a/usage_lt1.15_test.go +++ b/usage_lt1.15_test.go @@ -1,3 +1,4 @@ +//go:build !go1.15 // +build !go1.15 package main