initial commit
This commit is contained in:
@@ -1,3 +1,115 @@
|
||||
# CI-templates
|
||||
# CI Templates
|
||||
|
||||
CI pipeline templates
|
||||
Reusable Gitea Actions workflow templates for consistent code quality across repositories.
|
||||
|
||||
## Available Templates
|
||||
|
||||
### Python Code Quality (`.gitea/workflows/python/code-quality.yml`)
|
||||
|
||||
A comprehensive Python code quality pipeline including type checking, linting, formatting, and modernization.
|
||||
|
||||
**Features:**
|
||||
|
||||
- Type checking with mypy
|
||||
- Linting with ruff
|
||||
- Code formatting with ruff format
|
||||
- Python syntax modernization with pyupgrade
|
||||
- UV package management support
|
||||
|
||||
📖 [Read the full documentation](README-python-code-quality.md)
|
||||
|
||||
### Python Test Pipeline (`.gitea/workflows/python/pytest.yml`)
|
||||
|
||||
A comprehensive Python testing pipeline using pytest with coverage reporting and PR comment integration.
|
||||
|
||||
**Features:**
|
||||
|
||||
- Pytest testing with configurable arguments
|
||||
- Coverage reporting with pytest-cov
|
||||
- PR comment integration for coverage reports
|
||||
- UV package management support
|
||||
- Monorepo support
|
||||
|
||||
📖 [Read the full documentation](README-python-pytest.md)
|
||||
|
||||
### Web/General Formatting (`.gitea/workflows/web/formatting.yml`)
|
||||
|
||||
A formatting pipeline for web technologies and general file formats using Prettier and other tools.
|
||||
|
||||
**Features:**
|
||||
|
||||
- Prettier formatting for JS, TS, JSON, YAML, Markdown, HTML, CSS
|
||||
- Optional YAML validation with yamllint
|
||||
- Optional JSON syntax validation
|
||||
- Node.js environment setup
|
||||
|
||||
📖 [Read the full documentation](README-web-formatting.md)
|
||||
|
||||
## Quick Start
|
||||
|
||||
### For Python Projects
|
||||
|
||||
```yaml
|
||||
name: Code Quality
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
python-quality:
|
||||
uses: gitea.gt-proj.com/brian/CI-templates/.gitea/workflows/python/code-quality.yml@main
|
||||
```
|
||||
|
||||
### For Web/General Projects
|
||||
|
||||
```yaml
|
||||
name: Formatting
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
formatting:
|
||||
uses: gitea.gt-proj.com/brian/CI-templates/.gitea/workflows/web/formatting.yml@main
|
||||
```
|
||||
|
||||
### For Mixed Projects
|
||||
|
||||
```yaml
|
||||
name: Code Quality
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
python-quality:
|
||||
uses: gitea.gt-proj.com/brian/CI-templates/.gitea/workflows/python/code-quality.yml@main
|
||||
with:
|
||||
working-directory: "./backend"
|
||||
|
||||
web-formatting:
|
||||
uses: gitea.gt-proj.com/brian/CI-templates/.gitea/workflows/web/formatting.yml@main
|
||||
with:
|
||||
working-directory: "./frontend"
|
||||
```
|
||||
|
||||
## Repository Structure
|
||||
|
||||
```text
|
||||
.gitea/workflows/
|
||||
├── python/
|
||||
│ ├── code-quality.yml # Python code quality template
|
||||
│ └── pytest.yml # Python testing template
|
||||
└── web/
|
||||
└── formatting.yml # Web/general formatting template
|
||||
|
||||
README-python-code-quality.md # Python code quality documentation
|
||||
README-python-pytest.md # Python testing documentation
|
||||
README-web-formatting.md # Web formatting documentation
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
When updating templates:
|
||||
|
||||
1. Ensure backward compatibility
|
||||
2. Update documentation
|
||||
3. Test with sample projects
|
||||
4. Consider versioning with git tags for breaking changes
|
||||
|
||||
Reference in New Issue
Block a user