|
| 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