mirror of
https://github.com/codecov/codecov-action.git
synced 2026-04-19 20:22:34 +08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0cc6d49d9 | ||
|
|
96d1c9a15d | ||
|
|
ee0d391ad0 | ||
|
|
bd3230c275 | ||
|
|
c7a04fdde5 | ||
|
|
efe83d2996 | ||
|
|
db5a766c55 | ||
|
|
1f99174e83 | ||
|
|
93d126a749 |
@@ -1,5 +1,4 @@
|
|||||||
# Codecov @codecov
|
# Codecov @codecov
|
||||||
# Ibrahim Ali @ibrahim0814
|
|
||||||
|
|
||||||
FROM alpine:3.10
|
FROM alpine:3.10
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
To integrate Codecov with your Actions pipeline, specify the name of this repository with a tag number as a `step` within your `workflow.yml` file. This Action also requires you to provide an upload token from [codecov.io](https://www.codecov.io) (tip: in order to avoid exposing your token, store it as a `secret`). Optionally, you can choose to include three additional inputs to customize the upload context.
|
To integrate Codecov with your Actions pipeline, specify the name of this repository with a tag number as a `step` within your `workflow.yml` file. This Action also requires you to [provide an upload token](https://docs.codecov.io/docs/frequently-asked-questions#section-where-is-the-repository-upload-token-found-) from [codecov.io](https://www.codecov.io) (tip: in order to avoid exposing your token, store it as a `secret`). Optionally, you can choose to include three additional inputs to customize the upload context.
|
||||||
|
|
||||||
Inside your `.github/workflows/workflow.yml` file:
|
Inside your `.github/workflows/workflow.yml` file:
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ steps:
|
|||||||
flags: unittests #optional
|
flags: unittests #optional
|
||||||
name: codecov-umbrella #optional
|
name: codecov-umbrella #optional
|
||||||
```
|
```
|
||||||
>**Note**: This assumes that you've set your Codecov token inside *Settings > Secrets* as `CODECOV_TOKEN`. If not, you can get an upload token for your specific repo on [codecov.io](https://www.codecov.io).
|
>**Note**: This assumes that you've set your Codecov token inside *Settings > Secrets* as `CODECOV_TOKEN`. If not, you can [get an upload token](https://docs.codecov.io/docs/frequently-asked-questions#section-where-is-the-repository-upload-token-found-) for your specific repo on [codecov.io](https://www.codecov.io).
|
||||||
|
|
||||||
## Arguments
|
## Arguments
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Codecov @codecov
|
# Codecov @codecov
|
||||||
# Ibrahim Ali @ibrahim0814
|
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
if [ $# -eq 0 ]
|
if [ $# -eq 0 ]
|
||||||
then
|
then
|
||||||
bash <(curl -s https://codecov.io/bash)
|
echo "Please provide an upload token from codecov.io"
|
||||||
|
exit 1
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_FLAGS" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_FLAGS" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
||||||
then
|
then
|
||||||
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE -F $INPUT_FLAGS -n $INPUT_NAME
|
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE -F $INPUT_FLAGS -n $INPUT_NAME
|
||||||
@@ -20,40 +20,19 @@ then
|
|||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_NAME" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
|
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_NAME" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
|
||||||
then
|
then
|
||||||
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -n $INPUT_NAME -F $INPUT_FLAGS
|
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -n $INPUT_NAME -F $INPUT_FLAGS
|
||||||
elif [ "x$INPUT_NAME" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
|
|
||||||
then
|
|
||||||
bash <(curl -s https://codecov.io/bash) -n $INPUT_NAME -f $INPUT_FILE -F $INPUT_FLAGS
|
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ]
|
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ]
|
||||||
then
|
then
|
||||||
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE
|
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
|
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
|
||||||
then
|
then
|
||||||
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -F $INPUT_FLAGS
|
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -F $INPUT_FLAGS
|
||||||
elif [ "x$INPUT_FLAGS" != "x" ] && [ "x$INPUT_FILE" != "x" ]
|
|
||||||
then
|
|
||||||
bash <(curl -s https://codecov.io/bash) -F $INPUT_FLAGS -f $INPUT_FILE
|
|
||||||
elif [ "x$INPUT_FLAGS" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
|
||||||
then
|
|
||||||
bash <(curl -s https://codecov.io/bash) -F $INPUT_FLAGS -n $INPUT_NAME
|
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
||||||
then
|
then
|
||||||
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -n $INPUT_NAME
|
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -n $INPUT_NAME
|
||||||
elif [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
|
||||||
then
|
|
||||||
bash <(curl -s https://codecov.io/bash) -f $INPUT_FILE -n $INPUT_NAME
|
|
||||||
elif [ "x$INPUT_TOKEN" != "x" ]
|
elif [ "x$INPUT_TOKEN" != "x" ]
|
||||||
then
|
then
|
||||||
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN
|
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN
|
||||||
elif [ "x$INPUT_FILE" != "x" ]
|
|
||||||
then
|
|
||||||
bash <(curl -s https://codecov.io/bash) -f $INPUT_FILE
|
|
||||||
elif [ "x$INPUT_FLAGS" != "x" ]
|
|
||||||
then
|
|
||||||
bash <(curl -s https://codecov.io/bash) -F $INPUT_FLAGS
|
|
||||||
elif [ "x$INPUT_NAME" != "x" ]
|
|
||||||
then
|
|
||||||
bash <(curl -s https://codecov.io/bash) -n $INPUT_NAME
|
|
||||||
else
|
else
|
||||||
echo "error"
|
echo "Please provide an upload token from codecov.io with valid arguments"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user