Skip to content

Commit

Permalink
chore: run linting test in GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ClemDoum committed Mar 13, 2024
1 parent 46fb1f9 commit 5a4b38e
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 74 deletions.
17 changes: 17 additions & 0 deletions .github/actions/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
inputs:
path:
description: 'Path where linting test will be executed'
required: true

runs:
using: "composite"
steps:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint==3.1.0
- name: Run linting test
run: |
pylint_rc=$(pwd)/qa/pylintrc
cd ${{ inputs.path }}
pylint --rcfile $pylint_rc --load-plugins=pylint.extensions.bad_builtin
19 changes: 19 additions & 0 deletions .github/workflows/linting-common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Linting test for icij-common

on:
pull_request:
paths:
- 'icij-common/**.py'
push:
paths:
- 'icij-common/**.py'

# TODO: leverage some caching here
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/pylint
with:
path: icij-common
19 changes: 19 additions & 0 deletions .github/workflows/linting-worker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Linting test for icij-worker

on:
pull_request:
paths:
- 'icij-worker/**.py'
push:
paths:
- 'icij-worker/**.py'

# TODO: leverage some caching here
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/pylint
with:
path: icij-worker
36 changes: 0 additions & 36 deletions icij-common/linting_test.py

This file was deleted.

1 change: 0 additions & 1 deletion icij-common/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ python = "^3.9"
pydantic = "^1.10" # Sadly needed for now because of Pyinstaller

[tool.poetry.group.dev.dependencies]
pylint = "^2.15.10"
pytest = "^7.2.1"
pytest-asyncio = "^0.20.3"

Expand Down
36 changes: 0 additions & 36 deletions icij-worker/linting_test.py

This file was deleted.

1 change: 0 additions & 1 deletion icij-worker/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ icij_common = { path = "../icij-common", develop = true }
typer = { extras = ["all"], version = "^0.9.0" }

[tool.poetry.group.dev.dependencies]
pylint = "^2.15.10"
pytest = "^7.2.1"
pytest-asyncio = "^0.20.3"
icij_common = { path = "../icij-common", develop = true, extras = ["dev"] }
Expand Down

0 comments on commit 5a4b38e

Please sign in to comment.