Compare commits

...

31 Commits
v0.5 ... v1.0.2

Author SHA1 Message Date
Joe Becher
cb218a0977 Merge pull request #10 from codecov/drazisil-patch-1
install git and mercurial
2019-08-24 13:14:58 -04:00
Joe Becher
e78f79e460 install git and mercurial 2019-08-24 13:13:04 -04:00
Joe Becher
899e5c913e Merge pull request #9 from codecov/drazisil-patch-1
Repo now self-tests
2019-08-24 12:52:45 -04:00
Joe Becher
886c7c8bc8 Don't need sudo 2019-08-24 12:39:08 -04:00
Joe Becher
75d10d924b Install curl 2019-08-24 12:37:54 -04:00
Joe Becher
e61b738355 no need for apk 2019-08-24 12:36:15 -04:00
Joe Becher
cbad155b75 use ubuntu 2019-08-24 12:34:36 -04:00
Joe Becher
9e1c456662 Update main.yml 2019-08-24 12:32:59 -04:00
Joe Becher
392e5b2711 does this work? 2019-08-24 12:29:34 -04:00
Joe Becher
bd5538d84a add slash 2019-08-24 12:27:33 -04:00
Joe Becher
9d47efe7b9 local tests 2019-08-24 12:24:31 -04:00
Thomas Hu
6aa7ac1896 Merge pull request #8 from codecov/support-alpine
Update bash entrypoint
2019-08-24 11:38:00 -04:00
Thomas Hu
c2a68071b3 Update bash entrypoint 2019-08-24 11:29:05 -04:00
Ibrahim Ali
8273bebacc correct installation line org to codecov 2019-08-15 21:28:17 -07:00
Ibrahim Ali
6728012add add marketplace flag 2019-08-08 14:59:24 -07:00
Ibrahim Ali
e3f7b8baf8 Update README.md 2019-08-08 10:10:05 -07:00
“ibrahim0814”
4af6f0743e delete debug output 2019-08-08 09:42:59 -07:00
“ibrahim0814”
5c880506b5 env vars 2019-08-08 09:22:55 -07:00
“ibrahim0814”
a3a7edcc61 revert back to original 2019-08-08 09:21:49 -07:00
“ibrahim0814”
f93f6bdcae test env var 2019-08-08 08:39:08 -07:00
“ibrahim0814”
35b9267ca9 check what shows up for env 2019-08-08 08:24:15 -07:00
“ibrahim0814”
39a99a4e84 test ci env var 2019-08-08 08:19:32 -07:00
“ibrahim0814”
e0cc6d49d9 readme 2019-08-07 23:46:42 -07:00
“ibrahim0814”
96d1c9a15d readme 2019-08-07 23:44:17 -07:00
“ibrahim0814”
ee0d391ad0 clean up comments 2019-08-07 23:40:42 -07:00
“ibrahim0814”
bd3230c275 correct logic for token requirement 2019-08-07 23:00:45 -07:00
Ibrahim Ali
c7a04fdde5 Merge pull request #3 from codecov/thomasrockhu-patch-1
Better error message
2019-08-07 22:43:29 -07:00
Thomas Hu
efe83d2996 Revert "Remove options without a provided token"
This reverts commit db5a766c55.
2019-08-08 01:42:54 -04:00
Thomas Hu
db5a766c55 Remove options without a provided token
Remove options without a token
2019-08-08 01:39:13 -04:00
Thomas Hu
1f99174e83 Better error message 2019-08-08 01:36:45 -04:00
“ibrahim0814”
93d126a749 readme 2019-08-07 22:15:28 -07:00
4 changed files with 47 additions and 43 deletions

24
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Example workflow for Codecov
on: [push]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
# - name: Setup Python
# uses: actions/setup-python@master
# - name: Generate coverage report
# run: |
# pip install pytest
# pip install pytest-cov
# pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: ./
with:
token: ${{secrets.CODECOV_TOKEN}}
flags: unittest
name: codecov-1
#badstuff: morebadstuff

View File

@@ -1,13 +1,12 @@
# Codecov @codecov
# Ibrahim Ali @ibrahim0814
FROM alpine:3.10
FROM ubuntu:latest
WORKDIR /app
COPY . /app
RUN apk add --no-cache curl bash git
RUN apt update && apt install -y curl git mercurial
RUN chmod +x /app/entrypoint.sh
ENTRYPOINT [ "/app/entrypoint.sh" ]
ENTRYPOINT [ "/app/entrypoint.sh" ]

View File

@@ -1,23 +1,25 @@
# Codecov GitHub Action
### Easily upload coverage reports to Codecov from GitHub Actions
# Codecov GitHub Action
[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-v1.0.0-undefined.svg?logo=github&logoColor=white&style=flat)](https://github.com/marketplace/actions/codecov)
### Easily upload coverage reports to Codecov from GitHub Actions
## 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:
```yaml
steps:
- uses: actions/checkout@master
- uses: actions/codecov-action@v1
- uses: codecov/codecov-action@v1.0.0
with:
token: ${{secrets.CODECOV_TOKEN}} #required
file: ./coverage.xml #optional
flags: unittests #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
@@ -50,7 +52,7 @@ jobs:
pip install pytest-cov
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v1.0.0
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.xml

View File

@@ -1,59 +1,38 @@
#!/bin/bash
# Codecov @codecov
# Ibrahim Ali @ibrahim0814
set -eu
if [ $# -eq 0 ]
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" ]
then
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE -F $INPUT_FLAGS -n $INPUT_NAME
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -f $INPUT_FILE -F $INPUT_FLAGS -n $INPUT_NAME
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
then
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE -F $INPUT_FLAGS
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -f $INPUT_FILE -F $INPUT_FLAGS
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_NAME" != "x" ]
then
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE -n $INPUT_NAME
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -f $INPUT_FILE -n $INPUT_NAME
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_NAME" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
then
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
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -n $INPUT_NAME -F $INPUT_FLAGS
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ]
then
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -f $INPUT_FILE
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -f $INPUT_FILE
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
then
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
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -F $INPUT_FLAGS
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_NAME" != "x" ]
then
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
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -n $INPUT_NAME
elif [ "x$INPUT_TOKEN" != "x" ]
then
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
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN
else
echo "error"
echo "Please provide an upload token from codecov.io with valid arguments"
exit 1
fi
fi