From 554fdef3edc8bb5055768f226dacbd7c9ac018b7 Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 9 Apr 2026 20:09:04 +0200 Subject: [PATCH 01/16] feat: add basic CI --- .github/ci.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/ci.yaml diff --git a/.github/ci.yaml b/.github/ci.yaml new file mode 100644 index 0000000..b388b03 --- /dev/null +++ b/.github/ci.yaml @@ -0,0 +1,23 @@ +name: CI (test) + +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup python + uses: action/setup-python@v4 + with: + python-version: "3.11" + + - name: Install dependencies + run: pip install -r ./01-ci-lab/requirements.txt + + - name: Run test + run: pytest ./01-ci-lab \ No newline at end of file From ebf7c77d2d88e1e1fceeaedb25a62283b3c03258 Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 16 Apr 2026 18:44:00 +0200 Subject: [PATCH 02/16] chore: prep ci.yaml for the class --- .github/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ci.yaml b/.github/ci.yaml index b388b03..f82e50b 100644 --- a/.github/ci.yaml +++ b/.github/ci.yaml @@ -17,7 +17,7 @@ jobs: python-version: "3.11" - name: Install dependencies - run: pip install -r ./01-ci-lab/requirements.txt + run: pip install -r requirements.txt - name: Run test - run: pytest ./01-ci-lab \ No newline at end of file + run: pytest \ No newline at end of file From fd4e4c23123b1201c18fa460fcd1ad2d236cd5d5 Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 16 Apr 2026 19:39:04 +0200 Subject: [PATCH 03/16] fix: fix workflow file directory --- .github/ci.yaml | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 .github/ci.yaml diff --git a/.github/ci.yaml b/.github/ci.yaml deleted file mode 100644 index f82e50b..0000000 --- a/.github/ci.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: CI (test) - -on: [push] - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Setup python - uses: action/setup-python@v4 - with: - python-version: "3.11" - - - name: Install dependencies - run: pip install -r requirements.txt - - - name: Run test - run: pytest \ No newline at end of file From 0a8068b078a41a82e0749430cd37a05660c3cc9a Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 16 Apr 2026 19:42:00 +0200 Subject: [PATCH 04/16] fix: fix workflow file directory --- .github/workflows/ci.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..1a9a96e --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,23 @@ +name: CI (test) + +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Run test + run: pytest From e8f03f7c8736e4f356a04ed4fe7531fae45d8f5c Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 16 Apr 2026 19:45:14 +0200 Subject: [PATCH 05/16] test: create typo on purpose --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1a9a96e..0cb3036 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ jobs: uses: actions/checkout@v3 - name: Setup python - uses: actions/setup-python@v4 + uses: action/setup-python@v4 with: python-version: "3.11" From b9f19b823ac3183f6a9a4b63148d99bebe8c5c3e Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 16 Apr 2026 19:48:15 +0200 Subject: [PATCH 06/16] fix: fix typo in setup-python --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0cb3036..1a9a96e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ jobs: uses: actions/checkout@v3 - name: Setup python - uses: action/setup-python@v4 + uses: actions/setup-python@v4 with: python-version: "3.11" From 5dc03050e4d2f1ab9471db19e8bcfc614695d435 Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 16 Apr 2026 19:52:11 +0200 Subject: [PATCH 07/16] fix: fix path to installing dependencies --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1a9a96e..e970789 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,7 +17,7 @@ jobs: python-version: "3.11" - name: Install dependencies - run: pip install -r requirements.txt + run: pip install -r ./01-ci-lab/requirements.txt - name: Run test run: pytest From ee1d9aa8e70b12a37c6d4c079420277c3885a695 Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 16 Apr 2026 19:54:06 +0200 Subject: [PATCH 08/16] fix: fix path to pytest --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e970789..d48637b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,4 +20,4 @@ jobs: run: pip install -r ./01-ci-lab/requirements.txt - name: Run test - run: pytest + run: pytest 01-ci-lab From 43a2b4a899b449a26ad3e29d338e842467011067 Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 16 Apr 2026 20:02:40 +0200 Subject: [PATCH 09/16] fix: define default directory --- .github/workflows/ci.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d48637b..232c70f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,6 +6,10 @@ jobs: test: runs-on: ubuntu-latest + defaults: + run: + working-directory: 01-ci-lab + steps: - name: Checkout repository @@ -17,7 +21,7 @@ jobs: python-version: "3.11" - name: Install dependencies - run: pip install -r ./01-ci-lab/requirements.txt + run: pip install -r requirements.txt - name: Run test - run: pytest 01-ci-lab + run: pytest \ No newline at end of file From 69d55bd333c24476238b58a6ff4ebdc187e74062 Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 23 Apr 2026 19:29:50 +0200 Subject: [PATCH 10/16] feat: add linting --- .github/workflows/ci.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 232c70f..b537f89 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,4 +24,7 @@ jobs: run: pip install -r requirements.txt - name: Run test - run: pytest \ No newline at end of file + run: pytest + + - name: Run linter + run: flake8 . \ No newline at end of file From f7ffa3124d1de740681ea86f62a63b66586d1813 Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 23 Apr 2026 19:37:04 +0200 Subject: [PATCH 11/16] chore: fix formatting --- 01-ci-lab/app/calculator.py | 4 +++- 01-ci-lab/tests/test_calculator.py | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/01-ci-lab/app/calculator.py b/01-ci-lab/app/calculator.py index 7382287..18ccd84 100644 --- a/01-ci-lab/app/calculator.py +++ b/01-ci-lab/app/calculator.py @@ -1,5 +1,7 @@ def add(a, b): return a + b + def divide(a, b): - return a / b \ No newline at end of file + return a / b + \ No newline at end of file diff --git a/01-ci-lab/tests/test_calculator.py b/01-ci-lab/tests/test_calculator.py index 08c4a28..67ded70 100644 --- a/01-ci-lab/tests/test_calculator.py +++ b/01-ci-lab/tests/test_calculator.py @@ -1,7 +1,10 @@ from app.calculator import add, divide + def test_add(): assert add(2, 3) == 5 + def test_divide(): - assert divide(10, 2) == 5 \ No newline at end of file + assert divide(10, 2) == 5 + \ No newline at end of file From 63b7c049219387b16a531ea9968c3c049af6e865 Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 23 Apr 2026 19:41:24 +0200 Subject: [PATCH 12/16] chore: remove whitespace --- 01-ci-lab/app/calculator.py | 2 +- 01-ci-lab/tests/test_calculator.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/01-ci-lab/app/calculator.py b/01-ci-lab/app/calculator.py index 18ccd84..4025122 100644 --- a/01-ci-lab/app/calculator.py +++ b/01-ci-lab/app/calculator.py @@ -4,4 +4,4 @@ def add(a, b): def divide(a, b): return a / b - \ No newline at end of file + diff --git a/01-ci-lab/tests/test_calculator.py b/01-ci-lab/tests/test_calculator.py index 67ded70..b3cc2ad 100644 --- a/01-ci-lab/tests/test_calculator.py +++ b/01-ci-lab/tests/test_calculator.py @@ -7,4 +7,3 @@ def test_add(): def test_divide(): assert divide(10, 2) == 5 - \ No newline at end of file From 614ff9588b1c3715da5b18b241413f3603c10d19 Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 23 Apr 2026 19:42:36 +0200 Subject: [PATCH 13/16] chore: remove blank line --- 01-ci-lab/app/calculator.py | 1 - 1 file changed, 1 deletion(-) diff --git a/01-ci-lab/app/calculator.py b/01-ci-lab/app/calculator.py index 4025122..c064e26 100644 --- a/01-ci-lab/app/calculator.py +++ b/01-ci-lab/app/calculator.py @@ -4,4 +4,3 @@ def add(a, b): def divide(a, b): return a / b - From b98ae981bace1e79e8ba1a96b1339a85e0e58045 Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 23 Apr 2026 19:55:11 +0200 Subject: [PATCH 14/16] feat: add matrix strategy --- .github/workflows/ci.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b537f89..1f2329c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,6 +4,10 @@ on: [push] jobs: test: + strategy: + matrix: + python-version: [3.9, 3.10, 3.11] + runs-on: ubuntu-latest defaults: @@ -18,7 +22,7 @@ jobs: - name: Setup python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: ${{ matrix.python-version }} - name: Install dependencies run: pip install -r requirements.txt From 1788343c5e9d13477fa85cfcb4fd264467ad6025 Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 23 Apr 2026 20:04:30 +0200 Subject: [PATCH 15/16] fix: fix matrix strategy (version numbers) --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1f2329c..36cd811 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,7 +6,7 @@ jobs: test: strategy: matrix: - python-version: [3.9, 3.10, 3.11] + python-version: ["3.9", "3.10", "3.11"] runs-on: ubuntu-latest From 193d0eed1ff1f13c1e9574d7ce07851a3b60726b Mon Sep 17 00:00:00 2001 From: Agata Skorupka Date: Thu, 7 May 2026 10:56:43 +0200 Subject: [PATCH 16/16] test: test on PR --- .github/workflows/ci.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 36cd811..3951c97 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,6 +1,13 @@ name: CI (test) -on: [push] +on: + push: + branches: + - main + pull_request: + branches: + - main + jobs: test: