mirror of
https://github.com/sredevopsorg/deepseek-kubernetes-sandbox.git
synced 2026-11-03 01:13:24 +00:00
ci(workflows): streamline CI and remove redundant builds (#31)
Streamline the CI and release workflows: - ci.yaml is now PR-only (no push-to-main re-run) and keeps only lint and dependency-review; the gateway-image local build/smoke job is removed. - Split the path-sensitive jobs into ci-python.yaml and ci-manifests.yaml, each using native on.pull_request.paths filtering so unrelated PRs skip them. - Drop the duplicate check-manifests.py run from the lint job. - release.yaml: skip the tests job steps for tags already on main (where PR CI already ran), keeping them only for release-branch tags. Co-authored-by: SREDevOpsAgents <agents@sredevops.org>
This commit is contained in:
committed by
GitHub
parent
b57916d854
commit
dcb5b436f6
72
.github/workflows/ci-python.yaml
vendored
Normal file
72
.github/workflows/ci-python.yaml
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
# Gateway unit tests and lint. Split from ci.yaml so this job can use native
|
||||
# on.pull_request.paths filtering and skip PRs that do not touch the gateway.
|
||||
# The job name is the required branch-protection check `python`.
|
||||
name: CI (python)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- examples/dsh-agents-as-a-service/gateway/**
|
||||
- .github/workflows/ci-python.yaml
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ci-python-${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
python:
|
||||
name: python
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
defaults:
|
||||
run:
|
||||
working-directory: examples/dsh-agents-as-a-service/gateway
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
||||
with:
|
||||
python-version: "3.12"
|
||||
cache: pip
|
||||
cache-dependency-path: |
|
||||
examples/dsh-agents-as-a-service/gateway/requirements.txt
|
||||
examples/dsh-agents-as-a-service/gateway/requirements-dev.txt
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
set -euo pipefail
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt -r requirements-dev.txt
|
||||
- name: Lint
|
||||
run: |
|
||||
set -euo pipefail
|
||||
python -m ruff check .
|
||||
python -m ruff format --check .
|
||||
- name: Unit tests with coverage
|
||||
run: >-
|
||||
python -m pytest -q
|
||||
--cov=. --cov-report=xml:coverage.xml --cov-report=term
|
||||
--junitxml=junit.xml
|
||||
- name: Coverage summary
|
||||
run: |
|
||||
set -euo pipefail
|
||||
{
|
||||
echo "### Gateway test coverage"
|
||||
python -m coverage report
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
- name: Upload test artefacts
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: gateway-test-results
|
||||
path: |
|
||||
examples/dsh-agents-as-a-service/gateway/junit.xml
|
||||
examples/dsh-agents-as-a-service/gateway/coverage.xml
|
||||
if-no-files-found: warn
|
||||
retention-days: 7
|
||||
Reference in New Issue
Block a user