Skip to content

Commit 7e767d8

Browse files
committed
feat: When linting, only show GH annotations for primary python version
ref: nofusscomputing/centurion_erp#1201
1 parent fc65a58 commit 7e767d8

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

‎.github/workflows/python.yaml‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,28 @@ jobs:
231231
pip install -r requirements_dev.txt
232232
233233
234+
235+
236+
- name: Disable Matchers
237+
id: lint
238+
if: inputs.LINT && needs.init.outputs.py-any-changed
239+
shell: bash
240+
env:
241+
PY_CHANGED_FILES: ${{ needs.init.outputs.py-changed-files }}
242+
run: |
243+
echo "Primary Python version [${{ inputs.PYTHON_VERSION }}], Matrix Python Version [${{ matrix.python-version }}]";
244+
245+
if [ "${{ inputs.PYTHON_VERSION }}" != "${{ matrix.python-version }}" ]; then
246+
247+
echo "Only show Github annotations for primary Python version: ${{ inputs.PYTHON_VERSION }}";
248+
249+
echo "::remove-matcher owner=python::";
250+
251+
echo "::remove-matcher owner=bash::";
252+
253+
fi;
254+
255+
234256
- name: Lint ${{ matrix.python-version }}
235257
id: lint
236258
if: inputs.LINT && needs.init.outputs.py-any-changed

0 commit comments

Comments
 (0)