feat: add pyproject.toml and CI for ray-serve-apps package
Some checks failed
Build and Push Images / build-nvidia (push) Failing after 7m25s
Build and Push Images / build-rdna2 (push) Failing after 7m29s
Build and Push Images / build-strixhalo (push) Failing after 6m45s
Build and Push Images / build-intel (push) Failing after 6m22s
Build and Push Images / Release (push) Has been skipped
Build and Push Images / Notify (push) Successful in 1s
Build and Publish ray-serve-apps / lint (push) Failing after 3m9s
Build and Publish ray-serve-apps / publish (push) Has been skipped
Some checks failed
Build and Push Images / build-nvidia (push) Failing after 7m25s
Build and Push Images / build-rdna2 (push) Failing after 7m29s
Build and Push Images / build-strixhalo (push) Failing after 6m45s
Build and Push Images / build-intel (push) Failing after 6m22s
Build and Push Images / Release (push) Has been skipped
Build and Push Images / Notify (push) Successful in 1s
Build and Publish ray-serve-apps / lint (push) Failing after 3m9s
Build and Publish ray-serve-apps / publish (push) Has been skipped
- Restructure ray-serve as proper Python package (ray_serve/) - Add pyproject.toml with hatch build system - Add CI workflow to publish to Gitea PyPI - Add py.typed for PEP 561 compliance - Aligns with ADR-0019 handler deployment strategy
This commit is contained in:
87
.gitea/workflows/publish-ray-serve.yaml
Normal file
87
.gitea/workflows/publish-ray-serve.yaml
Normal file
@@ -0,0 +1,87 @@
|
||||
name: Build and Publish ray-serve-apps
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'ray-serve/**'
|
||||
- '.gitea/workflows/publish-ray-serve.yaml'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'ray-serve/**'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
NTFY_URL: http://ntfy.observability.svc.cluster.local:80
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install ruff
|
||||
run: pip install ruff
|
||||
|
||||
- name: Lint with ruff
|
||||
run: |
|
||||
cd ray-serve
|
||||
ruff check .
|
||||
ruff format --check .
|
||||
|
||||
publish:
|
||||
needs: lint
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install build tools
|
||||
run: pip install build twine
|
||||
|
||||
- name: Build package
|
||||
run: |
|
||||
cd ray-serve
|
||||
python -m build
|
||||
|
||||
- name: Publish to Gitea PyPI
|
||||
env:
|
||||
TWINE_USERNAME: ${{ secrets.REGISTRY_USER }}
|
||||
TWINE_PASSWORD: ${{ secrets.REGISTRY_TOKEN }}
|
||||
run: |
|
||||
cd ray-serve
|
||||
twine upload --repository-url https://git.daviestechlabs.io/api/packages/daviestechlabs/pypi \
|
||||
dist/*
|
||||
|
||||
- name: Notify on success
|
||||
if: success()
|
||||
run: |
|
||||
curl -s -X POST "${{ env.NTFY_URL }}/builds" \
|
||||
-H "Title: ray-serve-apps published" \
|
||||
-H "Priority: default" \
|
||||
-H "Tags: package,white_check_mark" \
|
||||
-d "Published ray-serve-apps to Gitea PyPI"
|
||||
|
||||
- name: Notify on failure
|
||||
if: failure()
|
||||
run: |
|
||||
curl -s -X POST "${{ env.NTFY_URL }}/builds" \
|
||||
-H "Title: ray-serve-apps publish failed" \
|
||||
-H "Priority: high" \
|
||||
-H "Tags: package,x" \
|
||||
-d "Failed to publish ray-serve-apps to Gitea PyPI"
|
||||
Reference in New Issue
Block a user