Bump version 0.1.1 → 0.2.0 #42
Workflow file for this run
This file contains 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: Build | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.python_version == '3.14' }} | |
strategy: | |
matrix: | |
python_version: ["3.12", "3.13", "3.14"] | |
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python_version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python_version }} | |
allow-prereleases: true | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
cache-dependency-glob: pyproject.toml | |
cache-suffix: py${{ matrix.python_version }} | |
- name: Install dependencies (uv sync) | |
run: uv sync --all-extras | |
- name: Check for code issues (ruff check) | |
uses: astral-sh/ruff-action@v1 | |
- name: Check code format (ruff format) | |
uses: astral-sh/ruff-action@v1 | |
with: | |
args: "format --check" | |
- name: Static type checking (MyPy) | |
run: uv run mypy src/githarbor/ | |
- name: Run tests | |
run: uv run pytest --cov-report=xml --cov=src/githarbor/ --cov-report=term-missing | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} | |
BITBUCKET_TOKEN: ${{ secrets.BITBUCKET_TOKEN }} | |
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} | |
AZURE_TOKEN: ${{ secrets.AZURE_TOKEN }} | |
- name: Upload test results to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: false | |
verbose: true | |
release: | |
runs-on: ubuntu-latest | |
needs: test | |
if: startsWith(github.ref, 'refs/tags/') | |
permissions: | |
# this permission is mandatory for trusted publishing | |
id-token: write | |
contents: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
cache-dependency-glob: pyproject.toml | |
cache-suffix: py${{ matrix.python_version }} | |
- name: Build package | |
run: uv build | |
- name: Release package on PyPI | |
run: uv publish | |
- name: Release package on GitHub | |
uses: ncipollo/release-action@v1 | |
with: | |
body: ${{ github.event.head_commit.message }} | |
artifacts: dist/*.whl,dist/*.tar.gz | |
token: ${{ secrets.GITHUB_TOKEN }} |