From 912bcbdc6b68bdc0db408893e7cada1da73ce254 Mon Sep 17 00:00:00 2001 From: PE-VCS Date: Tue, 4 Nov 2025 22:36:30 -0700 Subject: [PATCH 1/9] Update README with branch rules and checks instructions Added instructions for setting up branch rules and status checks. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index f33b12a..510d2cf 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # workflow-python-lint Only allows code that passes common linters for Python (black, etc) to merge into main + +In the repo settings, open Branches, add a rule for main, and enable Require a pull request before merging. +Turn on Require status checks to pass and select Python CI or the ci job as a required check. From 7edcdddf0a02223fe611ce884a204e0161d5472f Mon Sep 17 00:00:00 2001 From: PE-VCS Date: Tue, 4 Nov 2025 22:39:11 -0700 Subject: [PATCH 2/9] Specify test directory in pytest command --- .github/workflows/lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index adeca06..0dfc2de 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -31,4 +31,4 @@ jobs: run: flake8 . - name: Run tests - run: pytest -q + run: pytest -q tests From 4b1b008e64112d4e06146d1b9fe4a1dd427b8cd9 Mon Sep 17 00:00:00 2001 From: PE-VCS Date: Tue, 4 Nov 2025 22:39:32 -0700 Subject: [PATCH 3/9] Add hello function that returns 'Hello World' --- app.py | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 app.py diff --git a/app.py b/app.py new file mode 100644 index 0000000..5e6bf0d --- /dev/null +++ b/app.py @@ -0,0 +1,2 @@ +def hello(): + return "Hello World" From 8d19a50abba4eb92619af85c834ad2416309de33 Mon Sep 17 00:00:00 2001 From: PE-VCS Date: Tue, 4 Nov 2025 22:40:05 -0700 Subject: [PATCH 4/9] Add test for hello function --- tests/test_hello.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/test_hello.py diff --git a/tests/test_hello.py b/tests/test_hello.py new file mode 100644 index 0000000..642548b --- /dev/null +++ b/tests/test_hello.py @@ -0,0 +1,4 @@ +from app import hello + +def test_hello_returns_expected_message(): + assert hello() == "Hello World" From 6e0576b802cf741fa7989096f3227e173dfeaaec Mon Sep 17 00:00:00 2001 From: PE-VCS Date: Tue, 4 Nov 2025 22:41:21 -0700 Subject: [PATCH 5/9] Update test_hello.py --- tests/test_hello.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_hello.py b/tests/test_hello.py index 642548b..9150228 100644 --- a/tests/test_hello.py +++ b/tests/test_hello.py @@ -1,4 +1,5 @@ from app import hello + def test_hello_returns_expected_message(): assert hello() == "Hello World" From 5b55b0f8cf5b4d7e3a020a0df5465c634b2b1526 Mon Sep 17 00:00:00 2001 From: PE-VCS Date: Tue, 4 Nov 2025 22:43:10 -0700 Subject: [PATCH 6/9] Create __init__.py --- tests/__init__.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/__init__.py diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/tests/__init__.py @@ -0,0 +1 @@ + From 592955fe17c0f4e1b3c38b31e7a1538b1a8270f0 Mon Sep 17 00:00:00 2001 From: PE-VCS Date: Tue, 4 Nov 2025 22:43:54 -0700 Subject: [PATCH 7/9] Update __init__.py From fe7428a6aec490c7a045bd15718b6576c411c77a Mon Sep 17 00:00:00 2001 From: PE-VCS Date: Tue, 4 Nov 2025 22:45:19 -0700 Subject: [PATCH 8/9] Delete empty __init__.py file Remove empty __init__.py file from tests directory From 36bf26374fe9e717ebffef9bee8af45a61562527 Mon Sep 17 00:00:00 2001 From: PE-VCS Date: Tue, 4 Nov 2025 22:46:33 -0700 Subject: [PATCH 9/9] Remove Flake8 linting from lint workflow Removed Flake8 linting step from the workflow. --- .github/workflows/lint.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 0dfc2de..04aed5c 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -27,8 +27,5 @@ jobs: - name: Black check run: black --check . - - name: Flake8 lint - run: flake8 . - - name: Run tests run: pytest -q tests