Skip to content

Commit

Permalink
Merge pull request #169 from shogo82148/introduce-flag-name
Browse files Browse the repository at this point in the history
Introduce flag name
  • Loading branch information
shogo82148 committed May 25, 2020
2 parents d93733f + 1441ac4 commit 68382c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Expand Up @@ -38,7 +38,7 @@ jobs:
go install .
working-directory: src/github.com/mattn/goveralls
- name: test
run: goveralls -service=github -parallel
run: goveralls -service=github -parallel -flagname="Unit-${{ matrix.os }}-Go-${{ matrix.go }}"
working-directory: src/github.com/mattn/goveralls
env:
COVERALLS_TOKEN: ${{ github.token }}
Expand Down
3 changes: 3 additions & 0 deletions goveralls.go
Expand Up @@ -67,6 +67,7 @@ var (
show = flag.Bool("show", false, "Show which package is being tested")
customJobID = flag.String("jobid", "", "Custom set job token")
jobNumber = flag.String("jobnumber", "", "Custom set job number")
flagName = flag.String("flagname", os.Getenv("COVERALLS_FLAG_NAME"), "Job flag name, e.g. \"Unit\", \"Functional\", or \"Integration\". Will be shown in the Coveralls UI.")

parallelFinish = flag.Bool("parallel-finish", false, "finish parallel test")
)
Expand Down Expand Up @@ -99,6 +100,7 @@ type Job struct {
ServiceJobNumber string `json:"service_job_number,omitempty"`
ServicePullRequest string `json:"service_pull_request,omitempty"`
ServiceName string `json:"service_name"`
FlagName string `json:"flag_name,omitempty"`
SourceFiles []*SourceFile `json:"source_files"`
Parallel *bool `json:"parallel,omitempty"`
Git *Git `json:"git,omitempty"`
Expand Down Expand Up @@ -398,6 +400,7 @@ func process() error {
Git: collectGitInfo(head),
SourceFiles: sourceFiles,
ServiceName: *service,
FlagName: *flagName,
}

// Only include a job ID if it's known, otherwise, Coveralls looks
Expand Down

0 comments on commit 68382c0

Please sign in to comment.