Merge pull request #325 from mkorman90/dependabot/pip/attrs-gte-26.1.0 #73
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: CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Install ruff | |
| run: pip install ruff | |
| - name: Run ruff linter | |
| run: ruff check . | |
| - name: Run ruff formatter check | |
| run: ruff format --check . | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache pip dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip-${{ matrix.python-version }}- | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[full,dev]" | |
| - name: Run tests with pytest | |
| run: pytest -v regipy_tests/tests.py | |
| - name: Run CLI tests | |
| run: pytest -v regipy_tests/cli_tests.py | |
| - name: Run packaging tests | |
| run: pytest -v regipy_tests/test_packaging.py | |
| - name: Run plugin validation | |
| run: PYTHONPATH=. python regipy_tests/validation/plugin_validation.py | |
| validation-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[full,dev]" | |
| - name: Generate plugin validation documentation | |
| run: PYTHONPATH=. python regipy_tests/validation/plugin_validation.py | |
| - name: Upload validation documentation | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: plugin-validation-docs | |
| path: regipy_tests/validation/plugin_validation.md | |
| type-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[full,dev]" | |
| - name: Run mypy | |
| run: mypy regipy/ --ignore-missing-imports | |
| continue-on-error: true # Allow failures while adding type hints incrementally | |
| security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[full,dev]" | |
| pip install pip-audit cyclonedx-bom | |
| - name: Run pip-audit (vulnerability scan) | |
| run: pip-audit --skip-editable | |
| - name: Generate SBOM (CycloneDX) | |
| run: | | |
| cyclonedx-py environment -o sbom.json --of JSON | |
| cyclonedx-py environment -o sbom.xml --of XML | |
| - name: Upload SBOM | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: sbom | |
| path: | | |
| sbom.json | |
| sbom.xml |