From f6c57a5eebbfae102b46d3f4adb7f838b54fb63e Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 27 Oct 2025 01:22:03 +0300 Subject: [PATCH 1/4] Add test configuration --- .github/workflows/test.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1445964 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,30 @@ +name: Run Tests + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.13' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest hypothesis + + - name: Run tests in multiple folders + run: | + pytest test/ tests/ -v + From 63dc40f67cbb2be84addc2f076a0024fe00aad9f Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 24 Nov 2025 14:35:50 +0300 Subject: [PATCH 2/4] Format code --- .github/workflows/test.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1445964..56bb9c8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Run Tests +name: Python Tests on: push: @@ -10,21 +10,24 @@ jobs: test: runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.13] + steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: - python-version: '3.13' - + python-version: ${{ matrix.python-version }} + - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pytest hypothesis - - - name: Run tests in multiple folders + pip install -r requirements.txt + pip install pytest + + - name: Run tests run: | - pytest test/ tests/ -v - + pytest From 3599fd89b675734043f930a0ee039e9fa44d42d7 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 24 Nov 2025 14:39:07 +0300 Subject: [PATCH 3/4] Add pytest instead pyproject.toml --- pytest.ini | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 pytest.ini diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..dc6aa0f --- /dev/null +++ b/pytest.ini @@ -0,0 +1,8 @@ +[pytest] +pythonpath = . .. src +testpaths = tests +addopts = -v --tb=short +python_files = test_*.py +python_classes = Test* +python_functions = test_* + From 845b4fccb3bd5a74c32b4b77c7d7d7fdc2f30b3a Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 24 Nov 2025 14:51:29 +0300 Subject: [PATCH 4/4] Format code --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 56bb9c8..309d9f2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,6 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - pip install pytest - name: Run tests run: |