Test CI Templates / validate-syntax (push) Successful in 11s
Test CI Templates / test-python-code-quality (3.11) (push) Failing after 5s
Test CI Templates / test-python-pytest (true, 3.12) (push) Failing after 4s
Test CI Templates / test-web-formatting (true, false, 20) (push) Failing after 5s
Test CI Templates / test-python-code-quality (3.10) (push) Failing after 5s
Test CI Templates / test-python-code-quality (3.12) (push) Failing after 5s
Test CI Templates / test-python-code-quality (false, false, basic) (push) Failing after 5s
Test CI Templates / test-python-code-quality (false, true, skip-pyupgrade) (push) Failing after 5s
Test CI Templates / test-python-pytest (false, 3.11) (push) Failing after 5s
Test CI Templates / test-python-pytest (false, 3.12) (push) Failing after 5s
Test CI Templates / test-python-pytest (true, 3.11) (push) Failing after 5s
Test CI Templates / test-web-formatting (false, false, 20) (push) Failing after 5s
Test CI Templates / test-web-formatting (false, true, 18) (push) Failing after 5s
Test CI Templates / test-web-formatting (false, true, 20) (push) Failing after 5s
Test CI Templates / test-web-formatting (true, false, 18) (push) Failing after 5s
Test CI Templates / test-monorepo (push) Failing after 5s
Test CI Templates / test-web-formatting (true, true, 18) (push) Failing after 5s
Test CI Templates / test-web-formatting (true, true, 20) (push) Failing after 5s
Test CI Templates / test-results (push) Successful in 2s
Test CI Templates / test-python-code-quality (true, false, skip-mypy) (push) Failing after 5s
Test CI Templates / test-web-formatting (false, false, 18) (push) Failing after 5s
Test CI Templates / test-edge-cases (push) Failing after 5s
116 lines
2.8 KiB
Markdown
116 lines
2.8 KiB
Markdown
# CI 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)
|
|
|
|
## Usage
|
|
|
|
### 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
|