Skip to content

Commit fa2de9a

Browse files
authored
Update action.yml
1 parent 8ff21fe commit fa2de9a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

action.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ inputs:
5454
Publish to PyPi
5555
Default is false
5656
default: false
57-
57+
CODECOV_TOKEN:
58+
description: |
59+
Publish to codecov
60+
default: ''
5861
# Advanced Settings
5962
args:
6063
description: |
@@ -162,7 +165,14 @@ runs:
162165
cd "${{ inputs.root }}/${{ inputs.workdir }}"
163166
python -m flit install || python -m pip install .
164167
python -m pytest '${{ inputs.args }}' ${{ inputs.testdir }}
168+
169+
flags=$(echo ${${{ inputs.args }}##* :-unittests})
165170
shell: bash
171+
- if: ${{ inputs.CODECOV_TOKEN != '' }}
172+
uses: codecov/codecov-action@v3
173+
with:
174+
token: ${{ env.CODECOV_TOKEN }}
175+
flags: ${{ env.flags }}
166176

167177
- if: ${{ inputs.pypi_publish == 'true' }}
168178
run: |

0 commit comments

Comments
 (0)