Skip to content

Commit 00a11e7

Browse files
authored
Merge pull request #11 from cbdmaul/fix/session-id-key-normalization
fix session-id lookup when sessions.list uses int keys
2 parents 5e06805 + d133faa commit 00a11e7

7 files changed

Lines changed: 1176 additions & 362 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
push:
7+
branches: [ main ]
8+
9+
jobs:
10+
tests:
11+
name: required-test-check
12+
if: ${{ github.event_name == 'pull_request' || !contains(github.event.head_commit.message, '[skip ci]') }}
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 20
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12"
23+
cache: "pip"
24+
25+
- name: Install Poetry
26+
run: python -m pip install --upgrade pip poetry
27+
28+
- name: Install dependencies
29+
run: poetry install --with dev
30+
31+
- name: Run required test suite
32+
run: >
33+
poetry run python -m pytest
34+
tests/test_session_locking.py
35+
tests/test_timeout_cap.py
36+
tests/test_version_bump.py

‎.github/workflows/version-bump.yml‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Automated Version Bump
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
inputs:
8+
part:
9+
description: Version segment to bump
10+
required: true
11+
default: patch
12+
type: choice
13+
options:
14+
- patch
15+
- minor
16+
- major
17+
18+
permissions:
19+
contents: write
20+
21+
jobs:
22+
bump:
23+
if: ${{ github.actor != 'github-actions[bot]' && (github.event_name == 'workflow_dispatch' || !contains(github.event.head_commit.message, '[skip bump]')) }}
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 10
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Setup Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: "3.12"
36+
37+
- name: Choose bump part
38+
id: bump_part
39+
run: |
40+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
41+
echo "value=${{ inputs.part }}" >> "$GITHUB_OUTPUT"
42+
else
43+
echo "value=patch" >> "$GITHUB_OUTPUT"
44+
fi
45+
46+
- name: Bump version in pyproject.toml
47+
id: bump
48+
run: |
49+
NEW_VERSION=$(python scripts/bump_version.py --part "${{ steps.bump_part.outputs.value }}" --file pyproject.toml)
50+
echo "new_version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
51+
52+
- name: Commit and tag version bump
53+
env:
54+
NEW_VERSION: ${{ steps.bump.outputs.new_version }}
55+
GIT_AUTHOR_NAME: github-actions[bot]
56+
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
57+
GIT_COMMITTER_NAME: github-actions[bot]
58+
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
59+
run: |
60+
if [ -z "$NEW_VERSION" ]; then
61+
echo "No new version produced; exiting."
62+
exit 1
63+
fi
64+
git add pyproject.toml
65+
git commit -m "chore: bump version to $NEW_VERSION [skip ci][skip bump]" || exit 0
66+
git tag "v$NEW_VERSION"
67+
git push origin main
68+
git push origin "v$NEW_VERSION"

0 commit comments

Comments
 (0)