Skip to content

Update run-tests.yml to remove coveralls #58

Update run-tests.yml to remove coveralls

Update run-tests.yml to remove coveralls #58

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: Download .pylintrc file
uses: suisei-cn/actions-download-file@v1.4.0
id: pylintrc
with:
url: "https://raw.githubusercontent.com/nlp-tlp/badges/main/.pylintrc"
- name: Run Pylint
run: |
pylint ${{ github.event.repository.name }} --output pylint.log --exit-zero

Check failure on line 33 in .github/workflows/run-pylint.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/run-pylint.yml

Invalid workflow file

You have an error in your yaml syntax on line 33
- 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 ${{ github.event.repository.name }}-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: "${{ github.event.repository.name }}-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 ${{ github.event.repository.name }} Pylint badge"