Skip to content

Update pylint-score.yml #9

Update pylint-score.yml

Update pylint-score.yml #9

Workflow file for this run

name: Pylint Score Report
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
pylint-score:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and Run Devcontainer
run: |
# Build and start the container. Modify this command according to your setup.
make core-build
docker compose -f .devcontainer/docker-compose.yml build
docker run -d --name devcontainer model2queue-devcontainer
- name: Execute Pylint
run: |
# Execute pylint inside the devcontainer and extract the score
SCORE=$(docker compose -f .devcontainer/docker-compose.yml run devcontainer pylint /workspace/src/model2queue/model2queue | grep 'Your code has been rated at' | awk '{print $7}' | sed 's/\//\-/g')
echo "PYLINT_SCORE=$SCORE" >> $GITHUB_ENV
- name: Update PyLint Score in README
run: |
sed -i "s/PyLint Score:.*/PyLint Score: $PYLINT_SCORE/" README.md
git config user.email "[email protected]"
git config user.name "GitHub Action"
git add README.md
git commit -m "Update PyLint Score" || echo "No changes to commit"
git push