diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..357404fb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: PR CI + +on: + pull_request: + branches: + - main + workflow_dispatch: + +concurrency: + group: pr-ci-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + unit-tests: + name: Unit Tests + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + cache: "pip" + + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run stable unit test suite + env: + PYTHONPATH: ${{ github.workspace }} + run: | + python3 -m unittest \ + tests.test_ai_filter_fallback \ + tests.test_anthropic_response_parsing \ + tests.test_generate_content_guards \ + tests.test_generator_guard_repair \ + tests.test_markdown_normalizer \ + tests.test_runtime_profiles \ + tests.test_search_fallback \ + tests.test_tag_graph_runtime diff --git a/blog/themes/terminal-theme/layouts/index.html b/blog/themes/terminal-theme/layouts/index.html index 8ba5fb10..b6b9b572 100644 --- a/blog/themes/terminal-theme/layouts/index.html +++ b/blog/themes/terminal-theme/layouts/index.html @@ -62,6 +62,7 @@
{{ $posts := where .Site.RegularPages "Type" "posts" }} {{ $posts = sort $posts "Date" "desc" }} + {{ $latestPost := cond (gt (len $posts) 0) (index $posts 0) nil }}