chore: bootstrap Claude setup

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Sonnet 5 committed 2026-10-18 15:02:48 +02:00
1 parent b4453917dc
commit d99aed9a3c
12 files changed
+175 -7

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
name: CI
on:
pull_request:
branches: [development]
push:
branches: [development, main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install dependencies
run: pip install -r requirements.txt
# No linter is configured for the Python codebase yet (no ruff/black/flake8 in
# requirements.txt or config files), so only the test step runs here.
- name: Run tests
run: python -m pytest -q
+59
View File
@@ -0,0 +1,59 @@
name: Version bump
on:
push:
branches: [development, main]
permissions:
contents: write
jobs:
bump:
if: github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Bump version
run: |
set -euo pipefail
CURRENT=$(cat VERSION)
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT"
if [ "${{ github.ref_name }}" = "development" ]; then
PATCH=$((PATCH + 1))
elif [ "${{ github.ref_name }}" = "main" ]; then
# Merge commit from an approved development -> main PR: bump MINOR.
# Any other push to main is treated as a hotfix: bump PATCH.
PARENTS=$(git log -1 --pretty=%P | wc -w)
if [ "$PARENTS" -ge 2 ] && git log -1 --pretty=%s | grep -qi "development"; then
MINOR=$((MINOR + 1))
PATCH=0
else
PATCH=$((PATCH + 1))
fi
fi
NEW_VERSION="$MAJOR.$MINOR.$PATCH"
echo "$NEW_VERSION" > VERSION
git add VERSION
git commit -m "chore(release): v$NEW_VERSION [skip ci]"
git tag "v$NEW_VERSION"
git push origin HEAD:${{ github.ref_name }}
git push origin "v$NEW_VERSION"
- name: Merge main back into development
if: github.ref_name == 'main'
run: |
git fetch origin development
git checkout development
git merge --no-edit origin/main
git push origin development