Skip to content

Commit 8744c47

Browse files
authored
feat(actions): add codecov/codecov-action@v4 (#1259)
Part of #1257.
1 parent 403c368 commit 8744c47

File tree

5 files changed

+338
-2
lines changed

5 files changed

+338
-2
lines changed

actions/codecov/codecov-action/v4/action

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e0b68c6749509c5f83f984dd99a76a1c1a231044

docs/supported-actions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Click on a version to see the binding's code.
5656
* cachix
5757
* [install-nix-action](https://github.com/cachix/install-nix-action) - v17: [`InstallNixActionV17`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV17.kt), v18: [`InstallNixActionV18`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV18.kt), v19: [`InstallNixActionV19`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV19.kt), v20: [`InstallNixActionV20`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV20.kt), v21: [`InstallNixActionV21`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV21.kt), v22: [`InstallNixActionV22`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV22.kt), v23: [`InstallNixActionV23`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV23.kt), v24: [`InstallNixActionV24`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV24.kt), v25: [`InstallNixActionV25`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cachix/InstallNixActionV25.kt)
5858
* codecov
59-
* [codecov-action](https://github.com/codecov/codecov-action) - v3: [`CodecovActionV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/codecov/CodecovActionV3.kt)
59+
* [codecov-action](https://github.com/codecov/codecov-action) - v3: [`CodecovActionV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/codecov/CodecovActionV3.kt), v4: [`CodecovActionV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/codecov/CodecovActionV4.kt)
6060
* cycjimmy
6161
* [semantic-release-action](https://github.com/cycjimmy/semantic-release-action) - v3: [`SemanticReleaseActionV3`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cycjimmy/SemanticReleaseActionV3.kt), v4: [`SemanticReleaseActionV4`](https://github.com/typesafegithub/github-workflows-kt/blob/v[[ version ]]/github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/cycjimmy/SemanticReleaseActionV4.kt)
6262
* docker
@@ -140,6 +140,6 @@ Click on a version to see the binding's code.
140140
Number of bindings available:
141141

142142
* counting by actions: 84
143-
* counting each version separately: 148
143+
* counting each version separately: 149
144144

145145
Actions [providing typings](https://github.com/typesafegithub/github-actions-typing/) (marked with ✅ on the above list): 18

github-workflows-kt/src/gen/kotlin/io/github/typesafegithub/workflows/actions/codecov/CodecovActionV3.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
@file:Suppress(
55
"DataClassPrivateConstructor",
66
"UNUSED_PARAMETER",
7+
"DEPRECATION",
78
)
89

910
package io.github.typesafegithub.workflows.actions.codecov
@@ -12,6 +13,7 @@ import io.github.typesafegithub.workflows.domain.actions.Action
1213
import io.github.typesafegithub.workflows.domain.actions.RegularAction
1314
import java.util.LinkedHashMap
1415
import kotlin.Boolean
16+
import kotlin.Deprecated
1517
import kotlin.Int
1618
import kotlin.String
1719
import kotlin.Suppress
@@ -79,6 +81,10 @@ import kotlin.collections.toTypedArray
7981
* @param _customVersion Allows overriding action's version, for example to use a specific minor
8082
* version, or a newer version that the binding doesn't yet know about
8183
*/
84+
@Deprecated(
85+
message = "This action has a newer major version: CodecovActionV4",
86+
replaceWith = ReplaceWith("CodecovActionV4"),
87+
)
8288
public data class CodecovActionV3 private constructor(
8389
/**
8490
* Repository upload token - get it from codecov.io. Required only for private repositories
Lines changed: 329 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,329 @@
1+
// This file was generated using action-binding-generator. Don't change it by hand, otherwise your
2+
// changes will be overwritten with the next binding code regeneration.
3+
// See https://github.com/typesafegithub/github-workflows-kt for more info.
4+
@file:Suppress(
5+
"DataClassPrivateConstructor",
6+
"UNUSED_PARAMETER",
7+
)
8+
9+
package io.github.typesafegithub.workflows.actions.codecov
10+
11+
import io.github.typesafegithub.workflows.domain.actions.Action
12+
import io.github.typesafegithub.workflows.domain.actions.RegularAction
13+
import java.util.LinkedHashMap
14+
import kotlin.Boolean
15+
import kotlin.Int
16+
import kotlin.String
17+
import kotlin.Suppress
18+
import kotlin.Unit
19+
import kotlin.collections.List
20+
import kotlin.collections.Map
21+
import kotlin.collections.toList
22+
import kotlin.collections.toTypedArray
23+
24+
/**
25+
* Action: Codecov
26+
*
27+
* GitHub Action that uploads coverage reports for your repository to codecov.io
28+
*
29+
* [Action on GitHub](https://github.com/codecov/codecov-action)
30+
*
31+
* @param token Repository upload token - get it from codecov.io. Required only for private
32+
* repositories
33+
* @param codecovYmlPath Specify the path to the Codecov YML
34+
* @param commitParent Override to specify the parent commit SHA
35+
* @param directory Directory to search for coverage reports.
36+
* @param disableSearch Disable search for coverage files. This is helpful when specifying what
37+
* files you want to upload with the --file option.
38+
* @param disableFileFixes Disable file fixes to ignore common lines from coverage (e.g. blank lines
39+
* or empty brackets)
40+
* @param dryRun Don't upload files to Codecov
41+
* @param envVars Environment variables to tag the upload with (e.g. PYTHON | OS,PYTHON)
42+
* @param exclude Folders to exclude from search
43+
* @param failCiIfError Specify whether or not CI build should fail if Codecov runs into an error
44+
* during upload
45+
* @param file Path to coverage file to upload
46+
* @param files Comma-separated list of files to upload
47+
* @param flags Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome)
48+
* @param handleNoReportsFound Raise no exceptions when no coverage reports found
49+
* @param jobCode The job code
50+
* @param name User defined upload name. Visible in Codecov UI
51+
* @param os Override the assumed OS. Options are linux | macos | windows.
52+
* @param overrideBranch Specify the branch name
53+
* @param overrideBuild Specify the build number
54+
* @param overrideBuildUrl The URL of the build where this is running
55+
* @param overrideCommit Specify the commit SHA
56+
* @param overridePr Specify the pull request number
57+
* @param plugin plugins to run. Options: xcode, gcov, pycoverage. The default behavior runs them
58+
* all.
59+
* @param plugins Comma-separated list of plugins for use during upload.
60+
* @param reportCode The code of the report. If unsure, do not include
61+
* @param rootDir Used when not in git/hg project to identify project root directory
62+
* @param slug Specify the slug manually (Enterprise use)
63+
* @param url Specify the base url to upload (Enterprise use)
64+
* @param useLegacyUploadEndpoint Use the legacy upload endpoint
65+
* @param verbose Specify whether the Codecov output should be verbose
66+
* @param version Specify which version of the Codecov CLI should be used. Defaults to `latest`
67+
* @param workingDirectory Directory in which to execute codecov.sh
68+
* @param _customInputs Type-unsafe map where you can put any inputs that are not yet supported by
69+
* the binding
70+
* @param _customVersion Allows overriding action's version, for example to use a specific minor
71+
* version, or a newer version that the binding doesn't yet know about
72+
*/
73+
public data class CodecovActionV4 private constructor(
74+
/**
75+
* Repository upload token - get it from codecov.io. Required only for private repositories
76+
*/
77+
public val token: String? = null,
78+
/**
79+
* Specify the path to the Codecov YML
80+
*/
81+
public val codecovYmlPath: String? = null,
82+
/**
83+
* Override to specify the parent commit SHA
84+
*/
85+
public val commitParent: String? = null,
86+
/**
87+
* Directory to search for coverage reports.
88+
*/
89+
public val directory: String? = null,
90+
/**
91+
* Disable search for coverage files. This is helpful when specifying what files you want to
92+
* upload with the --file option.
93+
*/
94+
public val disableSearch: Boolean? = null,
95+
/**
96+
* Disable file fixes to ignore common lines from coverage (e.g. blank lines or empty brackets)
97+
*/
98+
public val disableFileFixes: Boolean? = null,
99+
/**
100+
* Don't upload files to Codecov
101+
*/
102+
public val dryRun: Boolean? = null,
103+
/**
104+
* Environment variables to tag the upload with (e.g. PYTHON | OS,PYTHON)
105+
*/
106+
public val envVars: List<String>? = null,
107+
/**
108+
* Folders to exclude from search
109+
*/
110+
public val exclude: List<String>? = null,
111+
/**
112+
* Specify whether or not CI build should fail if Codecov runs into an error during upload
113+
*/
114+
public val failCiIfError: Boolean? = null,
115+
/**
116+
* Path to coverage file to upload
117+
*/
118+
public val `file`: String? = null,
119+
/**
120+
* Comma-separated list of files to upload
121+
*/
122+
public val files: List<String>? = null,
123+
/**
124+
* Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome)
125+
*/
126+
public val flags: List<String>? = null,
127+
/**
128+
* Raise no exceptions when no coverage reports found
129+
*/
130+
public val handleNoReportsFound: Boolean? = null,
131+
/**
132+
* The job code
133+
*/
134+
public val jobCode: String? = null,
135+
/**
136+
* User defined upload name. Visible in Codecov UI
137+
*/
138+
public val name: String? = null,
139+
/**
140+
* Override the assumed OS. Options are linux | macos | windows.
141+
*/
142+
public val os: CodecovActionV4.OperatingSystem? = null,
143+
/**
144+
* Specify the branch name
145+
*/
146+
public val overrideBranch: String? = null,
147+
/**
148+
* Specify the build number
149+
*/
150+
public val overrideBuild: String? = null,
151+
/**
152+
* The URL of the build where this is running
153+
*/
154+
public val overrideBuildUrl: String? = null,
155+
/**
156+
* Specify the commit SHA
157+
*/
158+
public val overrideCommit: String? = null,
159+
/**
160+
* Specify the pull request number
161+
*/
162+
public val overridePr: Int? = null,
163+
/**
164+
* plugins to run. Options: xcode, gcov, pycoverage. The default behavior runs them all.
165+
*/
166+
public val plugin: List<CodecovActionV4.Plugin>? = null,
167+
/**
168+
* Comma-separated list of plugins for use during upload.
169+
*/
170+
public val plugins: List<CodecovActionV4.Plugin>? = null,
171+
/**
172+
* The code of the report. If unsure, do not include
173+
*/
174+
public val reportCode: String? = null,
175+
/**
176+
* Used when not in git/hg project to identify project root directory
177+
*/
178+
public val rootDir: String? = null,
179+
/**
180+
* Specify the slug manually (Enterprise use)
181+
*/
182+
public val slug: String? = null,
183+
/**
184+
* Specify the base url to upload (Enterprise use)
185+
*/
186+
public val url: String? = null,
187+
/**
188+
* Use the legacy upload endpoint
189+
*/
190+
public val useLegacyUploadEndpoint: Boolean? = null,
191+
/**
192+
* Specify whether the Codecov output should be verbose
193+
*/
194+
public val verbose: Boolean? = null,
195+
/**
196+
* Specify which version of the Codecov CLI should be used. Defaults to `latest`
197+
*/
198+
public val version: String? = null,
199+
/**
200+
* Directory in which to execute codecov.sh
201+
*/
202+
public val workingDirectory: String? = null,
203+
/**
204+
* Type-unsafe map where you can put any inputs that are not yet supported by the binding
205+
*/
206+
public val _customInputs: Map<String, String> = mapOf(),
207+
/**
208+
* Allows overriding action's version, for example to use a specific minor version, or a newer
209+
* version that the binding doesn't yet know about
210+
*/
211+
public val _customVersion: String? = null,
212+
) : RegularAction<Action.Outputs>("codecov", "codecov-action", _customVersion ?: "v4") {
213+
public constructor(
214+
vararg pleaseUseNamedArguments: Unit,
215+
token: String? = null,
216+
codecovYmlPath: String? = null,
217+
commitParent: String? = null,
218+
directory: String? = null,
219+
disableSearch: Boolean? = null,
220+
disableFileFixes: Boolean? = null,
221+
dryRun: Boolean? = null,
222+
envVars: List<String>? = null,
223+
exclude: List<String>? = null,
224+
failCiIfError: Boolean? = null,
225+
`file`: String? = null,
226+
files: List<String>? = null,
227+
flags: List<String>? = null,
228+
handleNoReportsFound: Boolean? = null,
229+
jobCode: String? = null,
230+
name: String? = null,
231+
os: CodecovActionV4.OperatingSystem? = null,
232+
overrideBranch: String? = null,
233+
overrideBuild: String? = null,
234+
overrideBuildUrl: String? = null,
235+
overrideCommit: String? = null,
236+
overridePr: Int? = null,
237+
plugin: List<CodecovActionV4.Plugin>? = null,
238+
plugins: List<CodecovActionV4.Plugin>? = null,
239+
reportCode: String? = null,
240+
rootDir: String? = null,
241+
slug: String? = null,
242+
url: String? = null,
243+
useLegacyUploadEndpoint: Boolean? = null,
244+
verbose: Boolean? = null,
245+
version: String? = null,
246+
workingDirectory: String? = null,
247+
_customInputs: Map<String, String> = mapOf(),
248+
_customVersion: String? = null,
249+
) : this(token=token, codecovYmlPath=codecovYmlPath, commitParent=commitParent,
250+
directory=directory, disableSearch=disableSearch, disableFileFixes=disableFileFixes,
251+
dryRun=dryRun, envVars=envVars, exclude=exclude, failCiIfError=failCiIfError,
252+
`file`=`file`, files=files, flags=flags, handleNoReportsFound=handleNoReportsFound,
253+
jobCode=jobCode, name=name, os=os, overrideBranch=overrideBranch,
254+
overrideBuild=overrideBuild, overrideBuildUrl=overrideBuildUrl,
255+
overrideCommit=overrideCommit, overridePr=overridePr, plugin=plugin, plugins=plugins,
256+
reportCode=reportCode, rootDir=rootDir, slug=slug, url=url,
257+
useLegacyUploadEndpoint=useLegacyUploadEndpoint, verbose=verbose, version=version,
258+
workingDirectory=workingDirectory, _customInputs=_customInputs,
259+
_customVersion=_customVersion)
260+
261+
@Suppress("SpreadOperator")
262+
override fun toYamlArguments(): LinkedHashMap<String, String> = linkedMapOf(
263+
*listOfNotNull(
264+
token?.let { "token" to it },
265+
codecovYmlPath?.let { "codecov_yml_path" to it },
266+
commitParent?.let { "commit_parent" to it },
267+
directory?.let { "directory" to it },
268+
disableSearch?.let { "disable_search" to it.toString() },
269+
disableFileFixes?.let { "disable_file_fixes" to it.toString() },
270+
dryRun?.let { "dry_run" to it.toString() },
271+
envVars?.let { "env_vars" to it.joinToString(",") },
272+
exclude?.let { "exclude" to it.joinToString(",") },
273+
failCiIfError?.let { "fail_ci_if_error" to it.toString() },
274+
`file`?.let { "file" to it },
275+
files?.let { "files" to it.joinToString(",") },
276+
flags?.let { "flags" to it.joinToString(",") },
277+
handleNoReportsFound?.let { "handle_no_reports_found" to it.toString() },
278+
jobCode?.let { "job_code" to it },
279+
name?.let { "name" to it },
280+
os?.let { "os" to it.stringValue },
281+
overrideBranch?.let { "override_branch" to it },
282+
overrideBuild?.let { "override_build" to it },
283+
overrideBuildUrl?.let { "override_build_url" to it },
284+
overrideCommit?.let { "override_commit" to it },
285+
overridePr?.let { "override_pr" to it.toString() },
286+
plugin?.let { "plugin" to it.joinToString(",") { it.stringValue } },
287+
plugins?.let { "plugins" to it.joinToString(",") { it.stringValue } },
288+
reportCode?.let { "report_code" to it },
289+
rootDir?.let { "root_dir" to it },
290+
slug?.let { "slug" to it },
291+
url?.let { "url" to it },
292+
useLegacyUploadEndpoint?.let { "use_legacy_upload_endpoint" to it.toString() },
293+
verbose?.let { "verbose" to it.toString() },
294+
version?.let { "version" to it },
295+
workingDirectory?.let { "working-directory" to it },
296+
*_customInputs.toList().toTypedArray(),
297+
).toTypedArray()
298+
)
299+
300+
override fun buildOutputObject(stepId: String): Action.Outputs = Outputs(stepId)
301+
302+
public sealed class OperatingSystem(
303+
public val stringValue: String,
304+
) {
305+
public object Linux : CodecovActionV4.OperatingSystem("linux")
306+
307+
public object Macos : CodecovActionV4.OperatingSystem("macos")
308+
309+
public object Windows : CodecovActionV4.OperatingSystem("windows")
310+
311+
public class Custom(
312+
customStringValue: String,
313+
) : CodecovActionV4.OperatingSystem(customStringValue)
314+
}
315+
316+
public sealed class Plugin(
317+
public val stringValue: String,
318+
) {
319+
public object Xcode : CodecovActionV4.Plugin("xcode")
320+
321+
public object Gcov : CodecovActionV4.Plugin("gcov")
322+
323+
public object Pycoverage : CodecovActionV4.Plugin("pycoverage")
324+
325+
public class Custom(
326+
customStringValue: String,
327+
) : CodecovActionV4.Plugin(customStringValue)
328+
}
329+
}

0 commit comments

Comments
 (0)