Expand README with Configuration section and clearer limitations and … #29
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: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| name: Code Quality Checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| # For CI stability, performance and compatibility reasons | |
| python-version: "3.12" | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip install ".[lint]" | |
| - name: Run linters | |
| run: | | |
| black --check --verbose . | |
| isort --check --diff . | |
| pylint src/ tests/ | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| strategy: | |
| fail-fast: true | |
| # To avoid overwhelming the API with parallel requests. Mock API in the future. | |
| max-parallel: 1 | |
| matrix: | |
| # For backwards compatibility | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install dependencies | |
| # Editable mode (-e) is required for coverage reporting | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip install -e ".[test]" | |
| - name: Run tests with coverage | |
| env: | |
| TDM_API_TOKEN: ${{ secrets.TDM_API_TOKEN }} | |
| run: pytest --cov=wiley_tdm --cov-report=xml --cov-report=html | |
| - name: Upload HTML coverage report | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-report-${{ matrix.python-version }} | |
| path: htmlcov | |
| retention-days: 7 | |
| build: | |
| name: Build Package | |
| runs-on: ubuntu-latest | |
| needs: [lint, test] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| # For CI stability, performance and compatibility reasons | |
| python-version: "3.12" | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip install ".[build]" | |
| - name: Build package | |
| run: python3 -m build | |
| - name: Verify package integrity | |
| run: twine check dist/* | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: python-dist | |
| path: dist/ | |
| retention-days: 7 |