diff --git a/action.yml b/action.yml index 04e23c7..d298709 100644 --- a/action.yml +++ b/action.yml @@ -19,7 +19,11 @@ inputs: required: false default: false job-number: - description: "job number" + description: "job number (DEPRECATED)" + required: false + default: '${{ strategy.job-index }}' + flag-name: + description: 'Job flag name, e.g. "Unit", "Functional", or "Integration". Will be shown in the Coveralls UI.' required: false default: '${{ strategy.job-index }}' working-directory: diff --git a/go.mod b/go.mod index 56ab047..7614425 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,4 @@ module github.com/shogo82148/actions-goveralls go 1.14 -require ( - github.com/mattn/goveralls v0.0.5 - golang.org/x/tools v0.0.0-20200521211927-2b542361a4fc // indirect -) +require github.com/mattn/goveralls v0.0.6 diff --git a/go.sum b/go.sum index 8cc2272..542c0f5 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,9 @@ -github.com/mattn/goveralls v0.0.5 h1:spfq8AyZ0cCk57Za6/juJ5btQxeE1FaEGMdfcI+XO48= -github.com/mattn/goveralls v0.0.5/go.mod h1:Xg2LHi51faXLyKXwsndxiW6uxEEQT9+3sjGzzwU4xy0= +github.com/mattn/goveralls v0.0.6 h1:cr8Y0VMo/MnEZBjxNN/vh6G90SZ7IMb6lms1dzMoO+Y= +github.com/mattn/goveralls v0.0.6/go.mod h1:h8b4ow6FxSPMQHF6o2ve3qsclnffZjYTNEKmLesRwqw= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 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.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -14,10 +14,9 @@ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200113040837-eac381796e91 h1:OOkytthzFBKHY5EfEgLUabprb0LtJVkQtNxAQ02+UE4= -golang.org/x/tools v0.0.0-20200113040837-eac381796e91/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200521211927-2b542361a4fc h1:6m2YO+AmBApbUOmhsghW+IfRyZOY4My4UYvQQrEpHfY= -golang.org/x/tools v0.0.0-20200521211927-2b542361a4fc/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375 h1:SjQ2+AKWgZLc1xej6WSzL+Dfs5Uyd5xcZH1mGC411IA= +golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 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-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/src/main.ts b/src/main.ts index 2e10e4f..143d84b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -10,7 +10,7 @@ async function run() { parallel_finished: parseBoolean( core.getInput("parallel-finished") || "false" ), - job_number: core.getInput("job-number"), + flag_name: core.getInput("flag-name"), working_directory: core.getInput("working-directory"), ignore: core.getInput("ignore"), }); diff --git a/src/runner.ts b/src/runner.ts index 143053b..d833697 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -6,7 +6,7 @@ interface Options { profile: string; parallel: boolean; parallel_finished: boolean; - job_number: string; + flag_name: string; working_directory: string; ignore: string; } @@ -38,6 +38,8 @@ const go_environment_values = [ // GitHub events information "GITHUB_WORKFLOW", + "GITHUB_RUN_ID", + "GITHUB_RUN_NUMBER", "GITHUB_ACTION", "GITHUB_ACTIONS", "GITHUB_ACTOR", @@ -69,8 +71,8 @@ async function run(options: Options) { ]; if (options.parallel) { args.push("-parallel"); - if (options.job_number !== "") { - args.push(`-jobnumber=${options.job_number}`); + if (options.flag_name !== "") { + args.push(`-flagname=${options.flag_name}`); } } await exec.exec(get_goveralls_path(), args, {