Skip to content

Commit 00a1b4b

Browse files
authored
Update action.yml
1 parent 01e81a9 commit 00a1b4b

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

action.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,12 @@ runs:
149149
with:
150150
python-version: ${{ inputs.python_version }}
151151
cache: 'pip' # caching pip dependencies
152-
- if: ${{ inputs.pytest == 'true' }}
152+
153+
- if: ${{ inputs.pylint == 'true' }}
154+
shell: bash
153155
run: |
154156
python -m pip install --upgrade pip
155-
python -m pip install pytest pylint
157+
python -m pip install pylint
156158
cd "${{ inputs.root }}/${{ inputs.workdir }}"
157159
python -m flit install || python -m pip install .
158160
@@ -173,21 +175,26 @@ runs:
173175
with:
174176
python-version: ${{ inputs.python_version }}
175177
cache: 'pip' # caching pip dependencies
178+
176179
- if: ${{ inputs.pytest == 'true' }}
180+
shell: bash
177181
run: |
178182
python -m pip install --upgrade pip
179183
python -m pip install pytest pytest-xdist pytest-cov flit requests_mock
180184
cd "${{ inputs.root }}/${{ inputs.workdir }}"
181185
python -m flit install || python -m pip install .
182186
python -m pytest '${{ inputs.args }}' ${{ inputs.testdir }}
183187
184-
shell: bash
185188
- if: ${{ inputs.pytest == 'true' && inputs.coverage == 'true' }}
186189
uses: codecov/codecov-action@v3
187190
with:
188191
flags: ${{ inputs.flags }}
189192

190193
- if: ${{ inputs.pypi_publish == 'true' }}
194+
shell: bash
195+
env:
196+
FLIT_USERNAME: __token__
197+
FLIT_PASSWORD: ${{ inputs.pypi_password }}
191198
run: |
192199
cd "${{ inputs.root }}"
193200
@@ -196,10 +203,6 @@ runs:
196203
197204
sed -i -r 's/\"[0-9]\.[0-9]\.[0-9]+\"/&\"${{ inputs.version_suffix }}\"/g' src/*/__init__.py
198205
python -m flit publish $repository --repository ${{ inputs.pypi_repo }} --pypirc .pypirc
199-
env:
200-
FLIT_USERNAME: __token__
201-
FLIT_PASSWORD: ${{ inputs.pypi_password }}
202-
shell: bash
203206
204207
# Ref: https://haya14busa.github.io/github-action-brandings/
205208
branding:

0 commit comments

Comments
 (0)