Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
permissions:
contents: read
steps:
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
permissions:
contents: read
steps:
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
permissions:
contents: read
actions: write
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
permissions:
contents: read
steps:
Expand All @@ -188,4 +188,19 @@ jobs:
cache: npm

- run: npm ci
# npm optional-deps bug: platform rollup binaries are sometimes skipped after npm ci
# (https://github.com/npm/cli/issues/4828). Install the native package explicitly.
- name: Ensure Rollup native binary
shell: bash
run: |
ROLLUP_VERSION=$(node -p "require('./node_modules/rollup/package.json').version")
case "$(node -p "process.platform + '-' + process.arch")" in
darwin-arm64) PKG="@rollup/rollup-darwin-arm64" ;;
darwin-x64) PKG="@rollup/rollup-darwin-x64" ;;
linux-x64) PKG="@rollup/rollup-linux-x64-gnu" ;;
win32-x64) PKG="@rollup/rollup-win32-x64-msvc" ;;
win32-arm64) PKG="@rollup/rollup-win32-arm64-msvc" ;;
*) echo "Unsupported Node platform: $(node -p "process.platform + '-' + process.arch")"; exit 1 ;;
esac
npm install --no-save "${PKG}@${ROLLUP_VERSION}"
Comment thread
clean6378-max-it marked this conversation as resolved.
- run: npm test
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Thanks for considering a patch. This repo is a small Flask app plus a hash-route
- **Python 3.12** (matches CI)
- **Node 20+** (only if you change `static/js/` or run frontend unit tests)

CI runs **`ruff check`**, **`ruff format --check`**, **`pip-audit`**, **`pytest`**, **integration tests**, and **Vitest** on **ubuntu-latest** and **windows-latest** (Python 3.12, Node 20). Type-check (`mypy`) and production install smoke run on Ubuntu only.
CI runs **`ruff check`**, **`ruff format --check`**, **`pip-audit`**, **`pytest`**, **integration tests**, and **Vitest** on **Ubuntu, Windows, and macOS** (`ubuntu-latest`, `windows-latest`, `macos-latest`; Python 3.12, Node 20). Type-check (`mypy`) and production install smoke run on Ubuntu only.

### Bootstrap (Windows PowerShell)

Expand Down Expand Up @@ -112,7 +112,7 @@ npm run test:coverage # optional
- [ ] `ruff check .` and `ruff format --check .` green locally
- [ ] `pytest -q` green locally
- [ ] `npm test` green if JS changed
- [ ] CI jobs green (`lint-and-audit`, `pytest`, `integration-tests`, `js-tests` on Ubuntu + Windows; `mypy`, `prod-install-smoke` on Ubuntu)
- [ ] CI jobs green (`lint-and-audit`, `pytest`, `integration-tests`, `js-tests` on Ubuntu + Windows + macOS; `mypy`, `prod-install-smoke` on Ubuntu)
- [ ] PR description includes a **Test plan** section
- [ ] API changes update [`docs/api-reference.md`](docs/api-reference.md) if behavior or errors change

Expand Down
4 changes: 1 addition & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions package.json
Comment thread
clean6378-max-it marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,5 @@
"jsdom": "^26.1.0",
"marked": "^12.0.1",
"vitest": "^3.2.4"
},
"optionalDependencies": {
"@rollup/rollup-linux-x64-gnu": "4.60.4"
}
}
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ types-Flask==1.1.6
pytest-cov>=5.0
ruff>=0.9.0
pip-audit>=2.7.0
hypothesis>=6.100.0
8 changes: 8 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@

from __future__ import annotations

import os
import shutil
from collections.abc import Mapping
from pathlib import Path

import pytest
from hypothesis import settings

from app import create_app

# Hypothesis profiles drive fuzz example counts/deadlines (deadline disabled to
# avoid timing flakiness on slow/CI runners). CI runs fewer examples for speed.
settings.register_profile("dev", max_examples=200, deadline=None)
settings.register_profile("ci", max_examples=100, deadline=None)
settings.load_profile("ci" if os.environ.get("CI") else "dev")
Comment thread
clean6378-max-it marked this conversation as resolved.

FIXTURES = Path(__file__).parent / "fixtures"


Expand Down
Loading
Loading