summaryrefslogtreecommitdiff
path: root/.github/workflows/unused-imports.yml
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-04-04 20:57:33 +0200
committerGitHub <noreply@github.com>2024-04-04 20:57:33 +0200
commitebf587c482c5ab6603975f4414d4f0374f4ff747 (patch)
tree1cca8dbd7a9c0258f7b9b574895b5823e2e29b79 /.github/workflows/unused-imports.yml
parent9d94afcba122ae6d4620e21b3e1ef1555b7bb2e1 (diff)
parent7717694f62978697f7886b7661363785f5d58efd (diff)
downloadvyos-1x-ebf587c482c5ab6603975f4414d4f0374f4ff747.tar.gz
vyos-1x-ebf587c482c5ab6603975f4414d4f0374f4ff747.zip
Merge pull request #3247 from vyos/mergify/bp/sagitta/pr-3246
T6199: drop unused Python imports from graphql source (backport #3246)
Diffstat (limited to '.github/workflows/unused-imports.yml')
-rw-r--r--.github/workflows/unused-imports.yml39
1 files changed, 15 insertions, 24 deletions
diff --git a/.github/workflows/unused-imports.yml b/.github/workflows/unused-imports.yml
index 83098ddf6..e716a9c01 100644
--- a/.github/workflows/unused-imports.yml
+++ b/.github/workflows/unused-imports.yml
@@ -1,29 +1,20 @@
name: Check for unused imports using Pylint
-on:
- pull_request_target:
- types: [opened, reopened, ready_for_review, locked]
+on: push
+ # pull_request_target:
+ # types: [opened, reopened, ready_for_review, locked]
jobs:
- build:
+ Check-Unused-Imports:
runs-on: ubuntu-latest
- strategy:
- matrix:
- python-version: ["3.11"]
steps:
- - uses: actions/checkout@v3
- - name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v3
- with:
- python-version: ${{ matrix.python-version }}
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install pylint
- - name: Analysing the code with pylint
- run: |
- tmp=$(git ls-files *.py | xargs pylint | grep W0611 | wc -l)
- if [[ $tmp -gt 0 ]]; then
- echo "Found $tmp occurrence of unused Python import statements!"
- exit 1
- fi
- exit 0
+ - uses: actions/checkout@v3
+ - name: Set up Python
+ uses: actions/setup-python@v3
+ with:
+ python-version: 3.11
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install pylint
+ - name: Analysing the code with pylint
+ run: make unused-imports