fix: resolve all 16 code-review findings (correctness, packaging, lint/CI) #32
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: Tests | |
| on: | |
| push: | |
| branches: [ dtq ] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Matches the DSpace-ISstag-integration consumer CI matrix. | |
| python-version: ["3.10", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: | | |
| pyproject.toml | |
| requirements-test.txt | |
| - name: Install package + test deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install . | |
| pip install -r requirements-test.txt | |
| - name: Run tests | |
| run: python -m pytest tests/ -v | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install pre-commit | |
| run: pip install pre-commit==4.2.0 | |
| - name: Ruff | |
| run: pre-commit run ruff --all-files | |
| - name: Pylint | |
| run: pre-commit run pylint --all-files | |
| # Non-blocking: strict typing is being introduced incrementally, so a | |
| # mypy finding is reported in the log but does not fail the job. The | |
| # version is pinned by the mirrors-mypy rev in .pre-commit-config.yaml. | |
| - name: Mypy | |
| continue-on-error: true | |
| run: pre-commit run mypy --all-files |