update workflow (#67)

* update workflow

* update file path

* fix action error

* fix step id

* revert test change

* test

* test

* fix newline

* run poetry install

* fix error

* install poetry

* test

* revert poetry install

* test calling pylint as module

* test calling pylint as module
This commit is contained in:
derek-hirotsu
2023-10-17 18:33:47 -07:00
committed by GitHub
parent f9bc0bd616
commit 59c0b7eb6d
5 changed files with 18 additions and 2 deletions

View File

@@ -12,20 +12,32 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: streetsidesoftware/cspell-action@v3
with:
files: |
**/*.py
**/*.md
exec_pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get Python changed files
id: changed-files-python
uses: tj-actions/changed-files@v39
with:
fetch-depth: 2
files: |
*.py
**/*.py
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
if: steps.changed-files-python.outputs.any_changed == 'true'
run: |
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
if: steps.changed-files-python.outputs.any_changed == 'true'
run: |
pylint $(git diff --name-only -r HEAD^1 HEAD -- '*.py')
python -m pylint ${{ steps.changed-files-python.outputs.all_changed_files }}