feat: add reusable CI/CD pipeline templates
Reusable Gitea Actions workflows for lint, test, build, and deploy: - lint-python, lint-node, lint-rust - test-python, test-node, test-rust - build-push (Docker build + push to Gitea registry) - deploy-k8s (GitOps image tag update in cluster repo) Plus example caller workflows for python-fullstack, rust-service, and node-frontend stacks. Branch refs aligned to staging per CON-570 standards.
This commit is contained in:
37
.gitea/workflows/lint-python.yaml
Normal file
37
.gitea/workflows/lint-python.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
# Reusable workflow: Python linting with Ruff
|
||||
# Usage: uses: wectrl-net/ci-templates/.gitea/workflows/lint-python.yaml@main
|
||||
name: Lint Python (Ruff)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
python-version:
|
||||
description: "Python version to use"
|
||||
required: false
|
||||
type: string
|
||||
default: "3.13"
|
||||
ruff-version:
|
||||
description: "Ruff version constraint"
|
||||
required: false
|
||||
type: string
|
||||
default: ">=0.9.0"
|
||||
working-directory:
|
||||
description: "Directory containing the Python project"
|
||||
required: false
|
||||
type: string
|
||||
default: "."
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Ruff
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ inputs.python-version }}
|
||||
- name: Install Ruff
|
||||
run: pip install "ruff${{ inputs.ruff-version }}"
|
||||
- name: Run Ruff
|
||||
run: ruff check --output-format=github .
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
Reference in New Issue
Block a user