From 606c2ce62ad8539b20715c151225394bff9566ce Mon Sep 17 00:00:00 2001 From: sam-khatab Date: Wed, 29 Apr 2026 11:55:21 +0200 Subject: [PATCH 1/5] Update Python version and requirements path in workflow --- .github/workflows/python-app.yml | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 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 0000000000..80c0770409 --- /dev/null +++ b/.github/workflows/python-app.yml @@ -0,0 +1,37 @@ +# 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: [ "master" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.14.4" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r starter/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 64112781cf565009053fb27832c37de9601d8405 Mon Sep 17 00:00:00 2001 From: sam-khatab Date: Wed, 29 Apr 2026 12:08:32 +0200 Subject: [PATCH 2/5] Update Python version in GitHub Actions workflow --- .github/workflows/python-app.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 80c0770409..b2addd2009 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -17,10 +17,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.10 + - name: Set up Python 3.13 uses: actions/setup-python@v3 with: - python-version: "3.14.4" + python-version: "3.13.3" - name: Install dependencies run: | python -m pip install --upgrade pip From 8dbd4bcc454bc435a9144ec39d4ac310c8f40d17 Mon Sep 17 00:00:00 2001 From: sam-khatab Date: Mon, 4 May 2026 10:01:41 +0200 Subject: [PATCH 3/5] Update python-app.yml --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index b2addd2009..8272c7393c 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -5,7 +5,7 @@ name: Python application on: push: - branches: [ "master" ] + branches: [ "master", "develop" ] permissions: contents: read From 4f7099ee303e60337898f78e347345fdef50720a Mon Sep 17 00:00:00 2001 From: sam-khatab Date: Mon, 4 May 2026 10:03:14 +0200 Subject: [PATCH 4/5] Add workflow_dispatch trigger to GitHub Actions --- .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 8272c7393c..40d5c3d69f 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -6,6 +6,7 @@ name: Python application on: push: branches: [ "master", "develop" ] + workflow_dispatch: permissions: contents: read From c96c5283e0043c03a1547b62dc3cfde37c96d051 Mon Sep 17 00:00:00 2001 From: sam-khatab Date: Mon, 4 May 2026 10:06:45 +0200 Subject: [PATCH 5/5] Update workflow to trigger only on develop branch --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 40d5c3d69f..d7608797bd 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -5,7 +5,7 @@ name: Python application on: push: - branches: [ "master", "develop" ] + branches: [ "develop" ] workflow_dispatch: permissions: