From a65c11c1e013cb581ec7f761629b1f735beb3451 Mon Sep 17 00:00:00 2001 From: CyberRoute Date: Mon, 23 Sep 2024 14:09:37 +0200 Subject: [PATCH] gitaction adding install reqs --- .github/workflows/pylint.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 41e7f4c..3ca287f 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -1,5 +1,3 @@ -name: Pylint - on: [push] jobs: @@ -7,23 +5,29 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10"] steps: - uses: actions/checkout@v4 + + # Set up the correct Python version for each matrix version - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} + # Install pip and pipenv - - name: Install dependencies + - name: Install pip and pipenv run: | python -m pip install --upgrade pip pip install pipenv - # Install project dependencies using pipenv - - name: Install dependencies from Pipfile + # Install dependencies using pipenv and explicitly specify the Python version + - name: Install dependencies with pipenv run: | - pipenv install --dev - - name: Analysing the code with pylint + pipenv install --dev --python $(which python) + + # Run pylint within the pipenv environment + - name: Analyse code with pylint run: | - pylint $(find . -type f -name "*.py" ! -path "./ui/*") + pipenv run pylint $(find . -type f -name "*.py" ! -path "./ui/*") +