Skip to content

Commit

Permalink
Create pylint.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
greeeen-dev authored Sep 20, 2024
1 parent 86a1c15 commit 5e907f0
Showing 1 changed file with 168 additions and 0 deletions.
168 changes: 168 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
name: Pylint

on: [push]

jobs:
build-linux:
name: "Linux (Optimized)"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: Download Plugin
uses: actions/checkout@v4
- name: Download Unifier
uses: actions/checkout@v4
with:
repository: UnifierHQ/unifier
path: unifier
- name: Download dependency reader
uses: actions/checkout@v4
with:
repository: UnifierHQ/plugin-dependency-reader
path: reader
- name: Copy Unifier files
run: |
mkdir utils
cp -r unifier/utils/* utils
cp unifier/requirements.txt requirements_unifier.txt
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Read Plugin requirements
run: |
python reader/reader.py
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_unifier.txt
pip install -r requirements.txt
pip install pylint
- name: Analysing the code with pylint
run: |
pylint --enable-all-extensions --extension-pkg-allow-list=orjson,ujson --disable=R,C,W $(git ls-files '*.py')
build-linux-stable:
name: "Linux (Stable)"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Download Plugin
uses: actions/checkout@v4
- name: Download Unifier
uses: actions/checkout@v4
with:
repository: UnifierHQ/unifier
path: unifier
- name: Download dependency reader
uses: actions/checkout@v4
with:
repository: UnifierHQ/plugin-dependency-reader
path: reader
- name: Copy Unifier files
run: |
mkdir utils
cp -r unifier/utils/* utils
cp unifier/requirements_stable.txt requirements_unifier.txt
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Read Plugin requirements
run: |
python reader/reader.py
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_unifier.txt
pip install -r requirements.txt
pip install pylint
- name: Analysing the code with pylint
run: |
pylint --enable-all-extensions --extension-pkg-allow-list=orjson,ujson --disable=R,C,W $(git ls-files '*.py')
build-windows:
name: "Windows (Optimized)"
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: Download Plugin
uses: actions/checkout@v4
- name: Download Unifier
uses: actions/checkout@v4
with:
repository: UnifierHQ/unifier
path: unifier
- name: Download dependency reader
uses: actions/checkout@v4
with:
repository: UnifierHQ/plugin-dependency-reader
path: reader
- name: Copy Unifier files
run: |
New-Item -Path utils -ItemType Directory
Copy-item -Force -Recurse unifier/utils/* -Destination utils/
Copy-item -Force unifier/requirements.txt -Destination requirements_unifier.txt
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Read Plugin requirements
run: |
python reader/reader.py
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_unifier.txt
pip install -r requirements.txt
pip install pylint
- name: Analysing the code with pylint
run: |
pylint --enable-all-extensions --extension-pkg-allow-list=orjson,ujson --disable=R,C,W $(git ls-files '*.py')
build-windows-stable:
name: "Windows (Stable)"
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Download Plugin
uses: actions/checkout@v4
- name: Download Unifier
uses: actions/checkout@v4
with:
repository: UnifierHQ/unifier
path: unifier
- name: Download dependency reader
uses: actions/checkout@v4
with:
repository: UnifierHQ/plugin-dependency-reader
path: reader
- name: Copy Unifier files
run: |
New-Item -Path utils -ItemType Directory
Copy-item -Force -Recurse unifier/utils/* -Destination utils/
Copy-item -Force unifier/requirements_stable.txt -Destination requirements_unifier.txt
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Read Plugin requirements
run: |
python reader/reader.py
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_unifier.txt
pip install -r requirements.txt
pip install pylint
- name: Pylint analysis
run: |
pylint --enable-all-extensions --extension-pkg-allow-list=orjson,ujson --disable=R,C,W $(git ls-files '*.py')

0 comments on commit 5e907f0

Please sign in to comment.