feat(config): switched from os module usage to pathlib #77
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: DocBinder OSS Library CI/CD | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| include: | |
| - python-version: "3.11" | |
| tox-env: "py311" | |
| - python-version: "3.12" | |
| tox-env: "py312" | |
| - python-version: "3.13" | |
| tox-env: "py313" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: "0.7.13" | |
| enable-cache: true | |
| - name: Install dependencies with uv | |
| run: | | |
| uv sync --locked --all-extras --dev | |
| - name: Lint code with uv | |
| run: | | |
| uv tool run ruff check --fix | |
| uv tool run ruff format | |
| - name: Run tox with uv | |
| run: | | |
| uv run tox -e ${{ matrix.tox-env }} | |
| pypi-publish: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - test | |
| if: github.ref == 'refs/heads/main' | |
| permissions: | |
| id-token: write | |
| environment: pypi | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: build release distributions | |
| run: | | |
| pip install hatchling | |
| python -m hatchling build | |
| - name: Publish release distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@v1.12.4 |