Skip to content

debugging

debugging #53

Workflow file for this run

name: Pylint
on:
push:
branches:
- main
paths-ignore:
- '**/README.md'
jobs:
lint:
name: PyLint Check
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./requirements.txt
- name: run pylint on all python files
run: |
pylint --exit-zero $(git ls-files "*.py")
- name: run pylint score updater
run: python ./utils/pylint_score_updater.py
- name: config git user identity
run: |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config user.name "${GITHUB_ACTOR}"
- name: check if pylint score has changed
working-directory: ${{ github.workspace }}
run: |
set +e
diff_result=$(git diff --exit-code ./README.md)
set -e
has_changed="False"; [ -n "$diff_result" ] && has_changed="True"
echo "::set-output name=has_changed::$has_changed"
echo "debugging..."
echo "$has_changed"
echo "done."
- name: debug has_changed value
run: echo "has_changed=${{ needs.check_changes.outputs.has_changed }}"
- name: commit and push changes if any
if: ${{ needs.check_changes.outputs.has_changed == 'true' }}
run: |
git add README.md
git commit -m "automatically update pylint score in the badge"
git push