From d95918357d72d37da0ff3548b5817ce6ccb36e58 Mon Sep 17 00:00:00 2001 From: Muhammad Amin Boubaker Date: Tue, 6 May 2025 16:46:19 +0100 Subject: [PATCH 1/5] Create pylint.yml --- .github/workflows/pylint.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..3a002c1 --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,23 @@ +name: Pylint + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + steps: + - uses: actions/checkout@v4 + - 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: | + pylint $(git ls-files '*.py') From ba4ee6b821ebd2466f0f59345966567c43b95586 Mon Sep 17 00:00:00 2001 From: Muhammad Amin Boubaker Date: Tue, 6 May 2025 17:01:34 +0100 Subject: [PATCH 2/5] Create python-app.yml --- .github/workflows/python-app.yml | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/python-app.yml diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..ac73230 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,42 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python application + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + + steps: + - uses: actions/checkout@v4 + - 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 flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest From 5562c19959c6ca08f3beb6a846d3759a3e56ef0b Mon Sep 17 00:00:00 2001 From: Muhammad Amin Boubaker Date: Tue, 6 May 2025 19:43:31 +0100 Subject: [PATCH 3/5] Update requirements.txt --- requirements.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 55f5a34..9b8da84 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ -typer==0.12.3 -rich==13.7.1 -python-dotenv==1.0.1 +requests>=2.32 +typer==0.12 +rich==13.7 +python-dotenv==1.0 From df3e6a42fdf10d189aebe9e3729a366bd3964cb4 Mon Sep 17 00:00:00 2001 From: Muhammad Amin Boubaker Date: Tue, 6 May 2025 19:55:04 +0100 Subject: [PATCH 4/5] Update python-app.yml Add fail-fast: false --- .github/workflows/python-app.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index ac73230..c19ce10 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -17,6 +17,7 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] From c78b2a76cdf78602ba6b5d7fe57212a78d9069cd Mon Sep 17 00:00:00 2001 From: Muhammad Amin Boubaker Date: Wed, 7 May 2025 15:20:48 +0100 Subject: [PATCH 5/5] Update pylint.yml Add fail-fast: false --- .github/workflows/pylint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 3a002c1..dfc96bd 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -6,6 +6,7 @@ jobs: build: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: