From c7c36f77174c4f3d2ac88c7d6024a22f0a53053c Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Fri, 24 Jan 2025 13:15:28 +0100 Subject: [PATCH] added unittest CI/CD workflow --- .gitea/workflows/tests.yaml | 17 +++++++++++++++++ tests/test_ex2.py | 2 +- tests/test_ex3.py | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/tests.yaml diff --git a/.gitea/workflows/tests.yaml b/.gitea/workflows/tests.yaml new file mode 100644 index 0000000..f2d5a65 --- /dev/null +++ b/.gitea/workflows/tests.yaml @@ -0,0 +1,17 @@ +name: Python unit tests +run-name: ${{ gitea.actor }} is running unit tests +on: [push, workflow_dispatch] + +jobs: + unittests: + runs-on: ubuntu-latest + container: catthehacker/ubuntu:act-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.13" + - name: Test with unittest + run: python -m unittest \ No newline at end of file diff --git a/tests/test_ex2.py b/tests/test_ex2.py index a4bf15b..bef5a59 100644 --- a/tests/test_ex2.py +++ b/tests/test_ex2.py @@ -1,6 +1,6 @@ import unittest -from ex2_tv import startRecordingAt +from src.ex2_tv import startRecordingAt class MyTestCase(unittest.TestCase): diff --git a/tests/test_ex3.py b/tests/test_ex3.py index 8236090..20a98e7 100644 --- a/tests/test_ex3.py +++ b/tests/test_ex3.py @@ -1,6 +1,6 @@ import unittest -from ex3_cards import tauntScore +from src.ex3_cards import tauntScore class MyTestCase(unittest.TestCase):