release: bump version to 0.1.3 #38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| # Verify libadwaita 1.1 compatibility (Ubuntu 22.04) | |
| import-check: | |
| name: Verify libadwaita 1.1 compatibility | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| python3-gi \ | |
| python3-gi-cairo \ | |
| gir1.2-gtk-4.0 \ | |
| gir1.2-adw-1 \ | |
| xvfb | |
| - name: Verify all modules import cleanly | |
| run: | | |
| xvfb-run -a python3 -c " | |
| # This verifies no AttributeError on missing Adw widgets | |
| import gi | |
| gi.require_version('Gtk', '4.0') | |
| gi.require_version('Adw', '1') | |
| from gi.repository import Gtk, Adw | |
| # Import all UI modules that use Adw widgets | |
| import sys; sys.path.insert(0, '.') | |
| from src.ui.preferences.base import create_password_entry_row, create_spin_row | |
| from src.ui.preferences.virustotal_page import VirusTotalPage | |
| from src.ui.preferences.database_page import DatabasePage | |
| from src.ui.preferences.onaccess_page import OnAccessPage | |
| from src.ui.preferences.scanner_page import ScannerPage | |
| from src.ui.preferences.scheduled_page import ScheduledPage | |
| from src.ui.virustotal_setup_dialog import VirusTotalSetupDialog | |
| print('All modules imported successfully with libadwaita', end=' ') | |
| print(f'{Adw.MAJOR_VERSION}.{Adw.MINOR_VERSION}.{Adw.MICRO_VERSION}') | |
| " | |
| test: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "pip" | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| python3-gi \ | |
| python3-gi-cairo \ | |
| gir1.2-gtk-4.0 \ | |
| gir1.2-adw-1 \ | |
| libgirepository-2.0-dev \ | |
| libcairo2-dev \ | |
| pkg-config \ | |
| python3-dev \ | |
| xvfb | |
| - name: Install Python dependencies | |
| run: pip install -e ".[dev]" | |
| - name: Run tests with coverage | |
| run: | | |
| xvfb-run -a pytest tests/core tests/ui tests/integration tests/profiles \ | |
| --ignore=tests/e2e \ | |
| --cov=src \ | |
| --cov-report=term-missing \ | |
| --cov-report=xml \ | |
| -v | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| if: matrix.python-version == '3.12' | |
| with: | |
| name: coverage-report | |
| path: coverage.xml | |
| retention-days: 30 | |
| - name: Check coverage threshold | |
| if: matrix.python-version == '3.12' | |
| run: | | |
| # Extract coverage percentage from XML report | |
| COVERAGE=$(python -c " | |
| import xml.etree.ElementTree as ET | |
| tree = ET.parse('coverage.xml') | |
| root = tree.getroot() | |
| line_rate = float(root.get('line-rate', 0)) | |
| print(f'{line_rate * 100:.1f}') | |
| ") | |
| echo "Coverage: ${COVERAGE}%" | |
| # The pyproject.toml fail_under=80 handles the threshold check | |
| # This just provides visibility in the logs |