From 3e8de3905716f2842d4639734e58831e0cc94343 Mon Sep 17 00:00:00 2001 From: Asya Date: Wed, 7 Jan 2026 19:00:16 +0300 Subject: [PATCH 1/3] =?UTF-8?q?Main.py=20=D0=B8=20test=5Fmain.py=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=B2=D1=82=D0=BE=D1=80=D0=BE=D0=B9=20=D0=BB?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD=D0=BE?= =?UTF-8?q?=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 2 ++ test_main.py | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 main.py create mode 100644 test_main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..ac89251 --- /dev/null +++ b/main.py @@ -0,0 +1,2 @@ +def hello(): + return "Hello, CI/CD!" \ No newline at end of file diff --git a/test_main.py b/test_main.py new file mode 100644 index 0000000..b457748 --- /dev/null +++ b/test_main.py @@ -0,0 +1,4 @@ +from main import hello + +def test_hello(): + assert hello() == "Hello, CI/CD!" \ No newline at end of file From 3416f165a9bd3109634e57f396f77d169db600f9 Mon Sep 17 00:00:00 2001 From: AsyaCh266 Date: Wed, 7 Jan 2026 19:32:59 +0300 Subject: [PATCH 2/3] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20CI=20workflow=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B8=20=D1=82=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cc6b5a0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: CI + +on: + push: + branches: [ lab2 ] + pull_request: + branches: [ lab2 ] + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: Install dependencies + run: pip install pytest + - name: Run tests + run: pytest From c052092a615747fb52166f9b92e980c67e2485d8 Mon Sep 17 00:00:00 2001 From: AsyaCh266 Date: Wed, 7 Jan 2026 19:43:15 +0300 Subject: [PATCH 3/3] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20CD=20workflow=20=D0=B4=D0=BB=D1=8F=20=D0=B0=D0=B2?= =?UTF-8?q?=D1=82=D0=BE=D0=BC=D0=B0=D1=82=D0=B8=D1=87=D0=B5=D1=81=D0=BA?= =?UTF-8?q?=D0=BE=D0=B9=20=D0=BF=D1=83=D0=B1=D0=BB=D0=B8=D0=BA=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=B8=20=D0=BF=D0=BE=20=D1=82=D0=B5=D0=B3=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..77c1d12 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,19 @@ +name: CD + +on: + push: + tags: + - '*' + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: Deployment step + run: echo "Публикация завершена для тега $GITHUB_REF"