Files
python-mcp-toolbox/.gitea/workflows/ci.yml
Matte23 0bdb817f26
Some checks failed
CI / test (push) Successful in 35s
CI / publish (push) Failing after 12s
ci: Add test and publish action
2026-03-16 14:19:04 +01:00

54 lines
1.1 KiB
YAML

name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m venv .venv
.venv/bin/pip install -e ".[dev]" -q
- name: Run tests
run: .venv/bin/pytest tests/ -v
publish:
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build package
run: |
pip install build -q
python -m build
- name: Publish to Gitea package registry
env:
TWINE_USERNAME: ${{ github.repository_owner }}
TWINE_PASSWORD: ${{ secrets.GITEA_TOKEN }}
run: |
pip install twine -q
twine upload \
--repository-url ${{ gitea.server_url }}/api/packages/${{ github.repository_owner }}/pypi \
dist/*