Add MkDocs documentation site and deployment workflows #185
Workflow file for this run
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: | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - run: python -m pip install -U pip | |
| - run: python -m pip install -e ".[dev]" | |
| - name: Run tests (unit & integration only) | |
| env: | |
| HYPOTHESIS_PROFILE: ci | |
| run: pytest -q --maxfail=1 --disable-warnings --cov=sudoku_dlx --cov-report=xml -m "not prop" | |
| - name: Build docs (no deploy) | |
| run: | | |
| python -m pip install -U mkdocs mkdocs-material | |
| mkdocs build --strict | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} # Not required for public repos | |
| files: ./coverage.xml | |
| flags: unittests | |
| fail_ci_if_error: false |