mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-09 12:26:24 +00:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
899e5c913e | ||
|
|
886c7c8bc8 | ||
|
|
75d10d924b | ||
|
|
e61b738355 | ||
|
|
cbad155b75 | ||
|
|
9e1c456662 | ||
|
|
392e5b2711 | ||
|
|
bd5538d84a | ||
|
|
9d47efe7b9 | ||
|
|
6aa7ac1896 | ||
|
|
c2a68071b3 | ||
|
|
8273bebacc | ||
|
|
6728012add |
24
.github/workflows/main.yml
vendored
Normal file
24
.github/workflows/main.yml
vendored
Normal 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
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
# Codecov @codecov
|
# Codecov @codecov
|
||||||
|
|
||||||
FROM alpine:3.10
|
FROM ubuntu:latest
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . /app
|
COPY . /app
|
||||||
|
|
||||||
RUN apk add --no-cache curl bash git
|
RUN apt update && apt install -y curl
|
||||||
|
|
||||||
RUN chmod +x /app/entrypoint.sh
|
RUN chmod +x /app/entrypoint.sh
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
# Codecov GitHub Action
|
# Codecov GitHub Action
|
||||||
|
|
||||||
|
[](https://github.com/marketplace/actions/codecov)
|
||||||
### Easily upload coverage reports to Codecov from GitHub Actions
|
### Easily upload coverage reports to Codecov from GitHub Actions
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@@ -10,7 +12,7 @@ Inside your `.github/workflows/workflow.yml` file:
|
|||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
- uses: actions/codecov-action@v1.0.0
|
- uses: codecov/codecov-action@v1.0.0
|
||||||
with:
|
with:
|
||||||
token: ${{secrets.CODECOV_TOKEN}} #required
|
token: ${{secrets.CODECOV_TOKEN}} #required
|
||||||
file: ./coverage.xml #optional
|
file: ./coverage.xml #optional
|
||||||
|
|||||||
@@ -10,28 +10,28 @@ then
|
|||||||
exit 1
|
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
|
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" ]
|
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
|
||||||
then
|
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" ]
|
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ] && [ "x$INPUT_NAME" != "x" ]
|
||||||
then
|
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" ]
|
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
|
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" ]
|
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FILE" != "x" ]
|
||||||
then
|
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" ]
|
elif [ "x$INPUT_TOKEN" != "x" ] && [ "x$INPUT_FLAGS" != "x" ]
|
||||||
then
|
then
|
||||||
bash <(curl -s https://codecov.io/bash) -t $INPUT_TOKEN -F $INPUT_FLAGS
|
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -F $INPUT_FLAGS
|
||||||
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
|
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN -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
|
curl -s https://codecov.io/bash | bash -s -- -t $INPUT_TOKEN
|
||||||
else
|
else
|
||||||
echo "Please provide an upload token from codecov.io with valid arguments"
|
echo "Please provide an upload token from codecov.io with valid arguments"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user