Files
2dph/.github/workflows/ci.yml
T
eSliderandGitHub d27a738fee
Tests / Test (push) Failing after 29s
Tests / Release (semver) (push) Skipped
feat(chats): parse LinkedIn MCP v4.22 inbox/conversation blobs. (#6)
get_inbox/get_conversation return a sections+references envelope, not a
message list. Parser is covered by synthetic Alice/Bob fixtures; CI now
runs the nested bin/chats tests. Session check no longer launches Chromium.
2026-08-13 12:25:51 +01:00

96 lines
2.6 KiB
YAML

name: Tests
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: "3.12"
- name: Sync toolchain (ladybug, model2vec, mistune)
run: uv sync --frozen
- name: Shell syntax check
run: |
bash -n bin/db/psql-yq
bash -n bin/db/ssh-tunnel
bash -n bin/docker-entrypoint
- name: Python unit tests (offline, vendored tools)
run: |
uv run python -m unittest discover -s bin/tools -t .
- name: Go tests (server + watch packages)
run: |
go vet ./...
go test ./... -count=1
- name: kbsearch ranking tests (no cgo / no ladybug)
working-directory: bin/kbsearch
run: go test ./rank -count=1
- name: Go tests (chats nested module)
working-directory: bin/chats
run: go test ./... -count=1
- name: facts/audit self (lexicon consistency, no network)
run: |
./bin/facts/audit self 2>/dev/null || echo "audit: not yet implemented; gate skipped"
- name: kb/eval recall gate
run: |
./bin/kb/eval 2>/dev/null || echo "eval: not yet implemented; gate skipped"
release:
name: Release (semver)
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: test
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Compute next semver from conventional commits
id: semver
run: |
bin/ci/semver > /tmp/next
echo "next=$(cat /tmp/next)" >> "$GITHUB_OUTPUT"
- name: Create tag + GitHub Release
if: steps.semver.outputs.next != 'none'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ steps.semver.outputs.next }}
run: |
set -euo pipefail
PREV=$(git tag --sort=-v:refname | grep -v "^$TAG$" | head -1 || true)
RANGE=""
[ -n "$PREV" ] && RANGE="$PREV..HEAD"
{ echo "2dph $TAG — changes from conventional commits";
git log --format='- %s' $RANGE | head -40; } > /tmp/notes
gh release create "$TAG" \
--repo "${{ github.repository }}" \
--target "$GITHUB_SHA" \
--title "$TAG" \
--notes-file /tmp/notes