Skip to content

Commit 391515e

Browse files
committed
fix: aktualisiere CI/CD-Konfiguration und füge Semantic Release hinzu
1 parent b863a80 commit 391515e

File tree

2 files changed

+84
-25
lines changed

2 files changed

+84
-25
lines changed
Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,55 @@
11
name: 🐍 CI/CD Pipeline (Automatic Release)
22

33
on:
4+
# Trigger on push to main branch
45
push:
5-
branches: [ main ]
6+
branches: [main]
67
paths-ignore:
78
- '.github/**'
89
- 'docs/**'
910
- '*.md'
1011
- '*.MD'
1112

13+
# Trigger on pull requests to main
1214
pull_request:
13-
branches: [ main ]
15+
branches: [main]
1416
paths-ignore:
1517
- '.github/**'
1618
- 'docs/**'
1719
- '*.md'
1820
- '*.MD'
1921

22+
# Manual trigger
2023
workflow_dispatch:
2124
inputs:
22-
security-engine:
23-
description: 'Security scan engine'
24-
type: choice
25-
default: 'both'
26-
options: ['gitleaks', 'gitguardian', 'both']
27-
force-release:
28-
description: 'Force create release'
29-
type: boolean
30-
default: false
3125
skip-pypi:
32-
description: 'Skip PyPI publishing'
26+
description: 'Skip PyPI publishing (GitHub release only)'
3327
type: boolean
3428
default: false
35-
python-version:
36-
description: 'Python version to use'
37-
type: string
38-
default: '3.12'
3929

4030
jobs:
41-
# Main Python CI/CD Pipeline using modular automation templates
42-
python-pipeline:
43-
name: 🐍 Python Release Pipeline
44-
uses: bauer-group/automation-templates/.github/workflows/python-automatic-release.yml@main
31+
python-release:
32+
name: 🐍 Python Semantic Release Pipeline
33+
uses: bauer-group/automation-templates/.github/workflows/python-semantic-release.yml@main
4534
with:
4635
# Python Configuration
47-
python-version: ${{ inputs.python-version || '3.12' }}
48-
package-source-path: 'src/nocodb_simple_client'
36+
python-version: '3.12' # or ['3.10', '3.11', '3.12'] for matrix
37+
38+
# Testing Configuration
39+
run-tests: true
40+
run-security-scan: true
4941

5042
# Security Configuration
51-
security-engine: ${{ inputs.security-engine || 'both' }}
43+
security-engine: 'both' # gitleaks, gitguardian, both
44+
45+
# Build Configuration
46+
build-local-wheel: true
5247

5348
# Release Configuration
54-
force-release: ${{ inputs.force-release || false }}
5549
skip-pypi: ${{ inputs.skip-pypi || false }}
5650

51+
# Documentation & Security Updates
52+
update-documentation: true
53+
update-security-policy: true
54+
5755
secrets: inherit

pyproject.toml

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,27 @@ dependencies = [
4545

4646
[project.optional-dependencies]
4747
dev = [
48+
# Testing
4849
"pytest>=7.0.0",
4950
"pytest-cov>=4.0.0",
5051
"pytest-benchmark>=4.0.0",
51-
"black>=22.0.0",
52+
"pytest-xdist>=3.0.0",
53+
54+
# Code Quality
5255
"ruff>=0.1.0",
56+
"black>=22.0.0",
5357
"mypy>=1.0.0",
58+
59+
# Security
5460
"bandit>=1.7.0",
61+
"safety>=2.0.0",
62+
63+
# Build & Release
5564
"build>=0.10.0",
5665
"twine>=4.0.0",
66+
"python-semantic-release>=8.0.0",
67+
68+
# Development Tools
5769
"pre-commit>=2.20.0",
5870
"tox>=4.0.0",
5971
"tomli>=2.0.0; python_version<'3.11'",
@@ -75,6 +87,46 @@ Repository = "https://github.com/bauer-group/nocodb-simple-client.git"
7587
"Bug Tracker" = "https://github.com/bauer-group/nocodb-simple-client/issues"
7688
Changelog = "https://github.com/bauer-group/nocodb-simple-client/blob/main/CHANGELOG.md"
7789

90+
# ============================================================================
91+
# SEMANTIC RELEASE CONFIGURATION
92+
# ============================================================================
93+
[tool.semantic_release]
94+
# Version management
95+
version_toml = ["pyproject.toml:project.version"] # Where to update version
96+
version_variables = [
97+
"src/nocodb_simple_client/__init__.py:__version__", # Optional: update __version__ in code
98+
]
99+
100+
# Git & Release configuration
101+
branch = "main"
102+
build_command = "python -m build"
103+
upload_to_vcs_release = true
104+
105+
# Changelog configuration
106+
changelog_file = "CHANGELOG.md"
107+
changelog_sections = [
108+
{section = "breaking", name = "Breaking Changes"},
109+
{section = "feat", name = "Features"},
110+
{section = "fix", name = "Bug Fixes"},
111+
{section = "perf", name = "Performance Improvements"},
112+
{section = "refactor", name = "Code Refactoring"},
113+
{section = "style", name = "Code Style"},
114+
{section = "build", name = "Build System"},
115+
{section = "docs", name = "Documentation"},
116+
{section = "test", name = "Tests"},
117+
{section = "ci", name = "CI/CD"},
118+
{section = "chore", name = "Chores"},
119+
{section = "revert", name = "Reverts"},
120+
]
121+
122+
# Commit parsing
123+
commit_parser = "conventional"
124+
125+
[tool.semantic_release.commit_parser_options]
126+
allowed_tags = ["feat", "fix", "docs", "style", "refactor", "perf", "test", "chore", "ci", "build", "revert"]
127+
minor_tags = ["feat"]
128+
patch_tags = ["fix", "perf"]
129+
78130
[tool.hatch.version]
79131
path = "src/nocodb_simple_client/__init__.py"
80132

@@ -111,6 +163,13 @@ markers = [
111163
[tool.coverage.run]
112164
source = ["src/nocodb_simple_client"]
113165
branch = true
166+
omit = [
167+
"*/tests/*",
168+
"*/test_*",
169+
"*/__pycache__/*",
170+
".tox/*",
171+
".venv/*",
172+
]
114173

115174
[tool.coverage.report]
116175
exclude_lines = [
@@ -125,6 +184,8 @@ exclude_lines = [
125184
"class .*\\bProtocol\\):",
126185
"@(abc\\.)?abstractmethod",
127186
]
187+
show_missing = true
188+
skip_covered = false
128189

129190
# Code formatting
130191
[tool.black]

0 commit comments

Comments
 (0)