mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-13 06:27:26 +00:00
Add use_python input to action.yml and update related files
* **action.yml** - Add a new input `use_python` to specify whether to use Python to run `codecov-cli` - Update the `runs` section to include a step for installing `codecov-cli` using Python when `use_python` is set to true * **README.md** - Update the usage section to include the new `use_python` option for running `codecov-cli` * **CHANGELOG.md** - Add an entry to mention the addition of the `use_python` option for running `codecov-cli`
This commit is contained in:
parent
21f471b090
commit
604c83ecb5
3 changed files with 18 additions and 0 deletions
|
|
@ -290,3 +290,7 @@ for the full list.
|
||||||
- #166 Bump requestretry from 4.1.1 to 4.1.2
|
- #166 Bump requestretry from 4.1.1 to 4.1.2
|
||||||
- #169 Bump typescript from 4.0.5 to 4.1.2
|
- #169 Bump typescript from 4.0.5 to 4.1.2
|
||||||
- #178 Bump @types/jest from 26.0.15 to 26.0.19
|
- #178 Bump @types/jest from 26.0.15 to 26.0.19
|
||||||
|
|
||||||
|
## 5.0.3
|
||||||
|
### Features
|
||||||
|
- Added an option to use Python to run `codecov-cli` in `action.yml` by introducing a new input `use_python`.
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,7 @@ steps:
|
||||||
name: codecov-umbrella # optional
|
name: codecov-umbrella # optional
|
||||||
token: ${{ secrets.CODECOV_TOKEN }} # required
|
token: ${{ secrets.CODECOV_TOKEN }} # required
|
||||||
verbose: true # optional (default = false)
|
verbose: true # optional (default = false)
|
||||||
|
use_python: true # optional (default = false)
|
||||||
```
|
```
|
||||||
|
|
||||||
The Codecov token can also be passed in via environment variables:
|
The Codecov token can also be passed in via environment variables:
|
||||||
|
|
@ -82,6 +83,7 @@ steps:
|
||||||
flags: unittests # optional
|
flags: unittests # optional
|
||||||
name: codecov-umbrella # optional
|
name: codecov-umbrella # optional
|
||||||
verbose: true # optional (default = false)
|
verbose: true # optional (default = false)
|
||||||
|
use_python: true # optional (default = false)
|
||||||
env:
|
env:
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
```
|
```
|
||||||
|
|
@ -138,6 +140,7 @@ Codecov's Action supports inputs from the user. These inputs, along with their d
|
||||||
| `verbose` | Specify whether the Codecov output should be verbose | Optional
|
| `verbose` | Specify whether the Codecov output should be verbose | Optional
|
||||||
| `version` | Specify which version of the Codecov CLI should be used. Defaults to `latest` | Optional
|
| `version` | Specify which version of the Codecov CLI should be used. Defaults to `latest` | Optional
|
||||||
| `working-directory` | Directory in which to execute codecov.sh | Optional
|
| `working-directory` | Directory in which to execute codecov.sh | Optional
|
||||||
|
| `use_python` | Use Python to run codecov-cli instead of binary | Optional
|
||||||
|
|
||||||
### Example `workflow.yml` with Codecov Action
|
### Example `workflow.yml` with Codecov Action
|
||||||
|
|
||||||
|
|
@ -175,6 +178,7 @@ jobs:
|
||||||
name: codecov-umbrella
|
name: codecov-umbrella
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
verbose: true
|
verbose: true
|
||||||
|
use_python: true
|
||||||
```
|
```
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|
|
||||||
10
action.yml
10
action.yml
|
|
@ -146,6 +146,10 @@ inputs:
|
||||||
working-directory:
|
working-directory:
|
||||||
description: 'Directory in which to execute codecov.sh'
|
description: 'Directory in which to execute codecov.sh'
|
||||||
required: false
|
required: false
|
||||||
|
use_python:
|
||||||
|
description: 'Use Python to run codecov-cli instead of binary'
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
|
|
||||||
branding:
|
branding:
|
||||||
color: 'red'
|
color: 'red'
|
||||||
|
|
@ -215,6 +219,12 @@ runs:
|
||||||
GITHUB_EVENT_NUMBER: ${{ github.event.number }}
|
GITHUB_EVENT_NUMBER: ${{ github.event.number }}
|
||||||
GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
|
- name: Install codecov-cli using Python
|
||||||
|
if: ${{ inputs.use_python == 'true' }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
pip install codecov-cli
|
||||||
|
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
run: ${GITHUB_ACTION_PATH}/dist/codecov.sh
|
run: ${GITHUB_ACTION_PATH}/dist/codecov.sh
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue