codecov
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.
The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Installation
dagger install github.com/disaster37/dagger-library-go/codecov@150d8064bdeb3f17d20789a42ce2e2ceb7e12429
Entrypoint
Return Type
Codecov !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
base | Container | - | A custom base image containing a codecov uploader |
version | String | - | The golang version to use when no go.mod |
Example
dagger -m github.com/disaster37/dagger-library-go/codecov@150d8064bdeb3f17d20789a42ce2e2ceb7e12429 call \
func (m *myModule) example() *Codecov {
return dag.
Codecov()
}
@function
def example() -> dag.Codecov:
return (
dag.codecov()
)
@func()
example(): Codecov {
return dag
.codecov()
}
Types
Codecov 🔗
container() 🔗
The container
Return Type
Container !
Example
dagger -m github.com/disaster37/dagger-library-go/codecov@150d8064bdeb3f17d20789a42ce2e2ceb7e12429 call \
container
func (m *myModule) example() *Container {
return dag.
Codecov().
Container()
}
@function
def example() -> dagger.Container:
return (
dag.codecov()
.container()
)
@func()
example(): Container {
return dag
.codecov()
.container()
}
withContainer() 🔗
WithContainer permit to set container
Return Type
Codecov !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
ctn | Container ! | - | No description provided |
Example
dagger -m github.com/disaster37/dagger-library-go/codecov@150d8064bdeb3f17d20789a42ce2e2ceb7e12429 call \
with-container --ctn IMAGE:TAG
func (m *myModule) example(ctn *Container) *Codecov {
return dag.
Codecov().
WithContainer(ctn)
}
@function
def example(ctn: dagger.Container) -> dag.Codecov:
return (
dag.codecov()
.with_container(ctn)
)
@func()
example(ctn: Container): Codecov {
return dag
.codecov()
.withContainer(ctn)
}
upload() 🔗
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | The source directory |
token | Secret ! | - | The codecov token |
injectCiEnvironment | Boolean | - | Inject all variable environment on Codecov container to auto discover them by Codecov upload |
name | String | - | optional name |
files | [String ! ] | - | optional list of coverage files |
flags | [String ! ] | - | optional additional flags for uploader |
Example
dagger -m github.com/disaster37/dagger-library-go/codecov@150d8064bdeb3f17d20789a42ce2e2ceb7e12429 call \
upload --src DIR_PATH --token env:MYSECRET
func (m *myModule) example(ctx context.Context, src *Directory, token *Secret) string {
return dag.
Codecov().
Upload(ctx, src, token)
}
@function
async def example(src: dagger.Directory, token: dagger.Secret) -> str:
return await (
dag.codecov()
.upload(src, token)
)
@func()
async example(src: Directory, token: Secret): Promise<string> {
return dag
.codecov()
.upload(src, token)
}