2 Commits

Author SHA1 Message Date
github-actions[bot]
180e7e4c02 chore(release): 0.1.0 2025-08-28 11:12:02 +00:00
8af71dd552 ci: remove irrelevant workflows 2025-08-28 13:11:31 +02:00
3 changed files with 21 additions and 152 deletions

View File

@@ -1,104 +0,0 @@
name: Commit Checks
on:
push:
branches:
- '*'
workflow_call:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: 🔀 checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: "${{ secrets.GITHUB_TOKEN }}"
submodules: 'recursive'
- name: 📦 install uv
uses: astral-sh/setup-uv@v5
- name: 🐍 python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: 📦 sync depedencies
run: |
uv sync
uv sync --group test
- name: 🧪 run tests
id: test
run: |
uv run pytest -v
coverage:
name: Check coverage
runs-on: ubuntu-latest
steps:
- name: 🔀 checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: "${{ secrets.GITHUB_TOKEN }}"
submodules: 'recursive'
- name: 📦 install uv
uses: astral-sh/setup-uv@v5
- name: 🐍 python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: 📦 sync depedencies
run: |
uv sync
uv sync --group test
- name: 🧪 run tests
id: test
run: |
uv run pytest -v --cov
- name: 📊 generate coverage report
if: always()
run: |
uv run coverage json
cov_percent=$(jq '.totals.percent_covered' coverage.json)
cov_percent_rounded=$(python3 -c "print(round(${cov_percent}, 2))")
cov_lines=$(jq '.totals.covered_lines' coverage.json)
cov_missing=$(jq '.totals.missing_lines' coverage.json)
cov_total=$(jq '.totals.num_statements' coverage.json)
cov_excluded=$(jq '.totals.excluded_lines' coverage.json)
report_success=$(python3 -c "print(str(${cov_percent} == 100).lower())")
if (( $(echo "$cov_percent >= 100" | bc -l) )); then
badge_color="brightgreen"
elif (( $(echo "$cov_percent >= 90" | bc -l) )); then
badge_color="yellow"
else
badge_color="red"
fi
echo "## 📊 Coverage Report" >> $GITHUB_STEP_SUMMARY
echo "![Coverage: $cov_percent_rounded%](https://img.shields.io/badge/Coverage-$cov_percent_rounded%25-$badge_color)" >> $GITHUB_STEP_SUMMARY
echo "| Total Lines | Covered | Missing | Excluded |" >> $GITHUB_STEP_SUMMARY
echo "|-------------|---------|---------|----------|" >> $GITHUB_STEP_SUMMARY
echo "| $cov_total | $cov_lines | $cov_missing | $cov_excluded |" >> $GITHUB_STEP_SUMMARY
echo "<details>" >> $GITHUB_STEP_SUMMARY
echo "<summary>Details</summary>" >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
uv run coverage report >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
echo "</details>" >> $GITHUB_STEP_SUMMARY

View File

@@ -1,48 +0,0 @@
name: PR Checks
on:
pull_request:
branches:
- '*'
jobs:
comment_coverage:
name: Comment coverage on PR
runs-on: ubuntu-latest
steps:
- name: 🔀 checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: "${{ secrets.GITHUB_TOKEN }}"
submodules: 'recursive'
- name: 📦 install uv
uses: astral-sh/setup-uv@v5
- name: 🐍 python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: 📦 sync depedencies
run: |
uv sync
uv sync --group test
- name: configure git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: 🧪 run coverage
run: |
uv run pytest --cov --junitxml=pytest.xml --cov-report=term-missing | tee pytest-coverage.txt
continue-on-error: true
- name: 📊 comment coverage
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: pytest-coverage.txt
junitxml-path: pytest.xml

21
CHANGELOG.md Normal file
View File

@@ -0,0 +1,21 @@
# Changelog
All notable changes to this project will be documented in this file.
## [0.1.0] - 2025-08-28
### Features
- [`dd4b8b0`](https://gitea.pufereq.pl/judas/judas_protocol/commit/dd4b8b0eb2ead66e449c93ae9c5222288774ad2a) **message.py**: add `Message` class
- [`5e3ed0f`](https://gitea.pufereq.pl/judas/judas_protocol/commit/5e3ed0fe0f1c7a15bd50b4fb5b563791c00ae0b8) **types.py**: add types.py
### Miscellaneous Tasks
- [`8af71dd`](https://gitea.pufereq.pl/judas/judas_protocol/commit/8af71dd55265a006803d1ea0a58cbd5746f5de5a) remove irrelevant workflows
### Build
- [`4cf669c`](https://gitea.pufereq.pl/judas/judas_protocol/commit/4cf669c373c973d1ebefbf3a1d22d43e06ee6596) **uv.lock**: add lockfile
- [`0fc7994`](https://gitea.pufereq.pl/judas/judas_protocol/commit/0fc7994e9de2bb50b9fa48bdeb1707ba725d0932) **pyproject.toml**: configure basedpyright to ignore Any
<!-- generated by git-cliff -->