Merge dev into branch #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Linting | |
on: | |
pull_request_target | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
if [ -f setup.py ]; then pip install .; fi | |
- name: Lint with pylint | |
run: | | |
pip install pylint | |
OUTPUT=$(pylint **/*.py --exit-zero) | |
#OUTPUT=$(shell command or script to extract the part your want) | |
echo 'MESSAGE<<EOF' >> $GITHUB_ENV | |
echo "$OUTPUT" >> $GITHUB_ENV | |
echo 'EOF' >> $GITHUB_ENV | |
- name: Post result to PR | |
uses: mshick/add-pr-comment@v1 | |
with: | |
message: ${{ env.MESSAGE }} | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
repo-token-user-login: 'github-actions[bot]' # The user.login for temporary GitHub tokens | |
allow-repeats: false # This is the default |