Skip to content

more linting

more linting #29

Workflow file for this run

name: Pylint
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint anybadge
- name: Run Pylint
run: |
pylint puggle --output pylint.log --exit-zero
- name: Get Pylint score and create badge
run: |
PYLINT_SCORE=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' pylint.log)
echo $PYLINT_SCORE
anybadge -l pylint --value=$PYLINT_SCORE -f puggle-pylint-badge.svg 2=red 4=orange 8=yellow 10=green
- name: Push badge to badges repo
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: "puggle-pylint-badge.svg"
destination_repo: "nlp-tlp/badges"
user_email: "github-actions[bot]@users.noreply.github.com"
user_name: "github-actions[bot]"
commit_message: "Update puggle Pylint badge"