Skip to content

Commit edb53b5

Browse files
authored
Merge pull request #57 from LUXROBO/feature/env-rgb-support
Add Env Module RGB Support + Security Fixes
2 parents c505e84 + 0fec775 commit edb53b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+5040
-193
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../docs/github/issue-templates/bug_report.md

.github/ISSUE_TEMPLATE/develop.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/develop.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../docs/github/issue-templates/develop.md

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../docs/github/issue-templates/feature_request.md

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../docs/github/PULL_REQUEST_TEMPLATE.md

.github/workflows/build.yml

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,71 @@
11

22
name: Build Status
33

4-
on: [push, pull_request]
4+
on:
5+
push:
6+
branches:
7+
- '**'
8+
pull_request:
9+
branches:
10+
- master
11+
- develop
512

613
jobs:
714
build:
8-
name: Build test
15+
name: Build and Test
916
runs-on: ubuntu-latest
1017

1118
strategy:
19+
fail-fast: false
1220
matrix:
13-
python-version: ['3.8', '3.9', '3.10', '3.11']
21+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
1422

1523
steps:
16-
- uses: actions/checkout@v2
24+
- name: Checkout code
25+
uses: actions/checkout@v4
1726

1827
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v2
28+
uses: actions/setup-python@v5
2029
with:
2130
python-version: ${{ matrix.python-version }}
2231

23-
- name: Install dependencies
32+
- name: Display Python version
33+
run: python --version
34+
35+
- name: Install dependencies (Python 3.8-3.11)
36+
if: matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' || matrix.python-version == '3.11'
37+
run: |
38+
python -m pip install --upgrade pip
39+
pip install --upgrade "flake8>=7.0.0" "importlib-metadata>=6.0.0" pytest "pytest-cov<5.0" "coverage<8.0"
40+
pip install -r requirements.txt
41+
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
42+
43+
- name: Install dependencies (Python 3.12+)
44+
if: matrix.python-version == '3.12' || matrix.python-version == '3.13'
2445
run: |
2546
python -m pip install --upgrade pip
26-
pip install flake8
47+
pip install ruff pytest "pytest-cov<5.0" "coverage<8.0"
2748
pip install -r requirements.txt
49+
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
2850
29-
- name: Run unit tests
51+
- name: Run linting (flake8)
52+
if: matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' || matrix.python-version == '3.11'
3053
run: |
31-
python --version
54+
echo "Checking code style with flake8..."
55+
python -m flake8 modi_plus tests --ignore E203,W503,W504,E501
56+
57+
- name: Run linting (ruff)
58+
if: matrix.python-version == '3.12' || matrix.python-version == '3.13'
59+
run: |
60+
echo "Checking code style with ruff (Python 3.12+ compatible)..."
61+
ruff check modi_plus tests --ignore E501
62+
63+
- name: Run unit tests with unittest
64+
run: |
65+
echo "Running unit tests with unittest..."
3266
python -m unittest
3367
34-
- name: Run convention tests
35-
run: python -m flake8 modi_plus tests --ignore E203,W503,W504,E501
68+
- name: Run pytest tests (make test equivalent)
69+
run: |
70+
echo "Running pytest tests..."
71+
python -m pytest tests/task/ tests/module/input_module/ tests/module/output_module/ -v

.github/workflows/pr-test.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
2+
name: PR Test - Required for Merge
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- master
8+
- develop
9+
10+
jobs:
11+
test:
12+
name: Test Python ${{ matrix.python-version }}
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Display Python version
30+
run: python --version
31+
32+
- name: Install dependencies (Python 3.8-3.11)
33+
if: matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' || matrix.python-version == '3.11'
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install --upgrade "flake8>=7.0.0" "importlib-metadata>=6.0.0" pytest "pytest-cov<5.0" "coverage<8.0"
37+
pip install -r requirements.txt
38+
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
39+
40+
- name: Install dependencies (Python 3.12+)
41+
if: matrix.python-version == '3.12' || matrix.python-version == '3.13'
42+
run: |
43+
python -m pip install --upgrade pip
44+
pip install ruff pytest "pytest-cov<5.0" "coverage<8.0"
45+
pip install -r requirements.txt
46+
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
47+
48+
- name: Run linting (flake8)
49+
if: matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10' || matrix.python-version == '3.11'
50+
run: |
51+
echo "Running code style check with flake8..."
52+
python -m flake8 modi_plus tests --ignore E203,W503,W504,E501
53+
54+
- name: Run linting (ruff)
55+
if: matrix.python-version == '3.12' || matrix.python-version == '3.13'
56+
run: |
57+
echo "Running code style check with ruff (Python 3.12+ compatible)..."
58+
ruff check modi_plus tests --ignore E501
59+
60+
- name: Run all tests (make test equivalent)
61+
run: |
62+
echo "Running all tests..."
63+
python -m pytest tests/task/ tests/module/input_module/ tests/module/output_module/ -v
64+
65+
- name: Check test coverage
66+
if: matrix.python-version == '3.11'
67+
run: |
68+
echo "Checking test coverage..."
69+
python -m pytest tests/task/ tests/module/input_module/ tests/module/output_module/ --cov=modi_plus --cov-report=term-missing
70+
71+
merge-check:
72+
name: ✅ All Tests Must Pass to Merge
73+
runs-on: ubuntu-latest
74+
needs: test
75+
if: always()
76+
steps:
77+
- name: Check test status
78+
run: |
79+
if [ "${{ needs.test.result }}" != "success" ]; then
80+
echo "❌ Tests failed! PR cannot be merged to ${{ github.base_ref }}."
81+
echo "Please fix the failing tests before merging."
82+
exit 1
83+
else
84+
echo "✅ All tests passed! PR is ready to merge to ${{ github.base_ref }}."
85+
fi
86+

0 commit comments

Comments
 (0)