Initial commit
Some checks failed
🧪 Integration Testing / 🔧 Test Integration (2023.12.0, 3.11) (push) Successful in 2m11s
🧪 Integration Testing / 🔧 Test Integration (2023.12.0, 3.12) (push) Successful in 2m2s
🧪 Integration Testing / 🔧 Test Integration (2024.1.0, 3.11) (push) Successful in 1m4s
🧪 Integration Testing / 🔧 Test Integration (2024.1.0, 3.12) (push) Successful in 1m19s
🛡️ Code Quality & Security Check / 🔍 Code Quality Analysis (push) Failing after 56s
Some checks failed
🧪 Integration Testing / 🔧 Test Integration (2023.12.0, 3.11) (push) Successful in 2m11s
🧪 Integration Testing / 🔧 Test Integration (2023.12.0, 3.12) (push) Successful in 2m2s
🧪 Integration Testing / 🔧 Test Integration (2024.1.0, 3.11) (push) Successful in 1m4s
🧪 Integration Testing / 🔧 Test Integration (2024.1.0, 3.12) (push) Successful in 1m19s
🛡️ Code Quality & Security Check / 🔍 Code Quality Analysis (push) Failing after 56s
Signed-off-by: Rafal Zielinski <sq4ind@gmail.com>
This commit is contained in:
34
.gitea/workflows/integration-test.yml
Normal file
34
.gitea/workflows/integration-test.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
name: 🧪 Integration Testing
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
test-integration:
|
||||
name: 🔧 Test Integration
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.11', '3.12']
|
||||
home-assistant-version: ['2023.12.0', '2024.1.0']
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🐍 Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: 📦 Install Home Assistant ${{ matrix.home-assistant-version }}
|
||||
run: |
|
||||
pip install homeassistant==${{ matrix.home-assistant-version }}
|
||||
pip install pytest pytest-homeassistant-custom-component
|
||||
|
||||
- name: 🧪 Run Integration Tests
|
||||
run: |
|
||||
python -m pytest tests/ -v --cov=custom_components/adguard_hub --cov-report=xml
|
55
.gitea/workflows/quality-check.yml
Normal file
55
.gitea/workflows/quality-check.yml
Normal file
@@ -0,0 +1,55 @@
|
||||
name: 🛡️ Code Quality & Security Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
code-quality:
|
||||
name: 🔍 Code Quality Analysis
|
||||
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.11'
|
||||
|
||||
- name: 📦 Install Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install flake8 black isort mypy bandit safety
|
||||
pip install homeassistant==2023.12.0
|
||||
pip install -r requirements-dev.txt || echo "No dev requirements found"
|
||||
|
||||
- name: 🎨 Check Code Formatting (Black)
|
||||
run: |
|
||||
black --check --diff custom_components/
|
||||
|
||||
- name: 📊 Import Sorting (isort)
|
||||
run: |
|
||||
isort --check-only --diff custom_components/
|
||||
|
||||
- name: 🔍 Linting (Flake8)
|
||||
run: |
|
||||
flake8 custom_components/ --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
flake8 custom_components/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
|
||||
- name: 🔒 Security Scan (Bandit)
|
||||
run: |
|
||||
bandit -r custom_components/ -f json -o bandit-report.json || true
|
||||
bandit -r custom_components/ --severity-level medium
|
||||
|
||||
- name: 🛡️ Dependency Security Check (Safety)
|
||||
run: |
|
||||
safety check --json --output safety-report.json || true
|
||||
safety check
|
||||
|
||||
- name: 🏷️ Type Checking (MyPy)
|
||||
run: |
|
||||
mypy custom_components/ --ignore-missing-imports --no-strict-optional
|
31
.gitea/workflows/release.yml
Normal file
31
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
name: 🚀 Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: 📦 Create Release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: 📥 Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 🏷️ Get Version
|
||||
id: version
|
||||
run: |
|
||||
VERSION=${GITHUB_REF#refs/tags/v}
|
||||
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
|
||||
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: 📦 Create Archive
|
||||
run: |
|
||||
cd custom_components
|
||||
zip -r ../adguard-control-hub-${{ steps.version.outputs.VERSION }}.zip adguard_hub/
|
||||
|
||||
- name: 🚀 Create Release
|
||||
run: |
|
||||
echo "Creating release for ${{ steps.version.outputs.TAG }}"
|
Reference in New Issue
Block a user