Skip to content

Document release flow and add manual PyPI workflow #10

Document release flow and add manual PyPI workflow

Document release flow and add manual PyPI workflow #10

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
test-and-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install test dependencies
run: python -m pip install -e .[test]
- name: Run unit tests
run: python -m pytest -q
package-smoke:
runs-on: ubuntu-latest
needs: test-and-build
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install release dependencies
run: python -m pip install -e .[release]
- name: Build package
run: python -m build
- name: Check package metadata
run: python -m twine check dist/*
- name: Install built wheel
shell: bash
run: |
python -m pip install dist/code2skill-*.whl
code2skill --help
python -m code2skill --version
python - <<'PY'
import importlib.resources
from code2skill import adapt_repository, create_scan_config, estimate, run_ci, scan
assert all(callable(item) for item in [adapt_repository, create_scan_config, estimate, run_ci, scan])
assert importlib.resources.files("code2skill").joinpath("py.typed").is_file()
PY