Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE/develop.md

This file was deleted.

1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/develop.md
16 changes: 0 additions & 16 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
11 changes: 0 additions & 11 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
58 changes: 47 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,71 @@

name: Build Status

on: [push, pull_request]
on:
push:
branches:
- '**'
pull_request:
branches:
- master
- develop

jobs:
build:
name: Build test
name: Build and Test
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
- name: Display Python version
run: python --version

- name: Install dependencies (Python 3.8-3.11)
if: matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' || matrix.python-version == '3.11'
run: |
python -m pip install --upgrade pip
pip install --upgrade "flake8>=7.0.0" "importlib-metadata>=6.0.0" pytest "pytest-cov<5.0" "coverage<8.0"
pip install -r requirements.txt
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi

- name: Install dependencies (Python 3.12+)
if: matrix.python-version == '3.12' || matrix.python-version == '3.13'
run: |
python -m pip install --upgrade pip
pip install flake8
pip install ruff pytest "pytest-cov<5.0" "coverage<8.0"
pip install -r requirements.txt
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi

- name: Run unit tests
- name: Run linting (flake8)
if: matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' || matrix.python-version == '3.11'
run: |
python --version
echo "Checking code style with flake8..."
python -m flake8 modi_plus tests --ignore E203,W503,W504,E501

- name: Run linting (ruff)
if: matrix.python-version == '3.12' || matrix.python-version == '3.13'
run: |
echo "Checking code style with ruff (Python 3.12+ compatible)..."
ruff check modi_plus tests --ignore E501

- name: Run unit tests with unittest
run: |
echo "Running unit tests with unittest..."
python -m unittest

- name: Run convention tests
run: python -m flake8 modi_plus tests --ignore E203,W503,W504,E501
- name: Run pytest tests (make test equivalent)
run: |
echo "Running pytest tests..."
python -m pytest tests/task/ tests/module/input_module/ tests/module/output_module/ -v
86 changes: 86 additions & 0 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@

name: PR Test - Required for Merge

on:
pull_request:
branches:
- master
- develop

jobs:
test:
name: Test Python ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Display Python version
run: python --version

- name: Install dependencies (Python 3.8-3.11)
if: matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' || matrix.python-version == '3.11'
run: |
python -m pip install --upgrade pip
pip install --upgrade "flake8>=7.0.0" "importlib-metadata>=6.0.0" pytest "pytest-cov<5.0" "coverage<8.0"
pip install -r requirements.txt
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi

- name: Install dependencies (Python 3.12+)
if: matrix.python-version == '3.12' || matrix.python-version == '3.13'
run: |
python -m pip install --upgrade pip
pip install ruff pytest "pytest-cov<5.0" "coverage<8.0"
pip install -r requirements.txt
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi

- name: Run linting (flake8)
if: matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' || matrix.python-version == '3.11'
run: |
echo "Running code style check with flake8..."
python -m flake8 modi_plus tests --ignore E203,W503,W504,E501

- name: Run linting (ruff)
if: matrix.python-version == '3.12' || matrix.python-version == '3.13'
run: |
echo "Running code style check with ruff (Python 3.12+ compatible)..."
ruff check modi_plus tests --ignore E501

- name: Run all tests (make test equivalent)
run: |
echo "Running all tests..."
python -m pytest tests/task/ tests/module/input_module/ tests/module/output_module/ -v

- name: Check test coverage
if: matrix.python-version == '3.11'
run: |
echo "Checking test coverage..."
python -m pytest tests/task/ tests/module/input_module/ tests/module/output_module/ --cov=modi_plus --cov-report=term-missing

merge-check:
name: βœ… All Tests Must Pass to Merge
runs-on: ubuntu-latest
needs: test
if: always()
steps:
- name: Check test status
run: |
if [ "${{ needs.test.result }}" != "success" ]; then
echo "❌ Tests failed! PR cannot be merged to ${{ github.base_ref }}."
echo "Please fix the failing tests before merging."
exit 1
else
echo "βœ… All tests passed! PR is ready to merge to ${{ github.base_ref }}."
fi

24 changes: 16 additions & 8 deletions .github/workflows/unit_test_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,35 @@ on: [push, pull_request]

jobs:
unit_test:
name: macOS Test
name: macOS Test - Python ${{ matrix.python-version }}
runs-on: macos-latest

strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
# Python 3.8 excluded: pyobjc-core requires Python 3.9+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Display Python version
run: python --version

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade pytest "pytest-cov<5.0" "coverage<8.0"
pip install -r requirements.txt

- name: Run unit tests
run: |
python --version
python -m unittest
- name: Run unit tests with unittest
run: python -m unittest

- name: Run pytest tests
run: python -m pytest tests/task/ tests/module/input_module/ tests/module/output_module/ -v
23 changes: 15 additions & 8 deletions .github/workflows/unit_test_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,34 @@ on: [push, pull_request]

jobs:
unit_test:
name: Ubuntu Test
name: Ubuntu Test - Python ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Display Python version
run: python --version

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade pytest "pytest-cov<5.0" "coverage<8.0"
pip install -r requirements.txt

- name: Run unit tests
run: |
python --version
python -m unittest
- name: Run unit tests with unittest
run: python -m unittest

- name: Run pytest tests
run: python -m pytest tests/task/ tests/module/input_module/ tests/module/output_module/ -v
20 changes: 13 additions & 7 deletions .github/workflows/unit_test_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,33 @@ on: [push, pull_request]

jobs:
unit_test:
name: Windows Test
name: Windows Test - Python ${{ matrix.python-version }}
runs-on: windows-latest

strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Display Python version
run: python --version

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade pytest "pytest-cov<5.0" "coverage<8.0"
pip install -r requirements.txt

- name: Run unit tests
- name: Run pytest tests (unittest skipped due to BLE compatibility issues on Windows)
run: |
python --version
python -m unittest
echo "Note: unittest skipped on Windows due to bleak-winrt compatibility with Python 3.12+"
python -m pytest tests/task/ tests/module/input_module/ tests/module/output_module/ -v
Loading