Make books use PTX generate templates for student pages by default #126
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| pull_request: | |
| paths: | |
| - 'components/rsptx/db/**' | |
| - 'components/rsptx/configuration/**' | |
| - 'components/rsptx/validation/**' | |
| - 'components/rsptx/response_helpers/**' | |
| - 'components/rsptx/endpoint_validators/**' | |
| - 'bases/rsptx/book_server_api/**' | |
| - 'bases/rsptx/assignment_server_api/**' | |
| - 'test/**' | |
| - '.github/workflows/test-crud.yml' | |
| - 'pyproject.toml' | |
| - 'uv.lock' | |
| jobs: | |
| crud-tests: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: runestone | |
| POSTGRES_PASSWORD: runestone | |
| POSTGRES_DB: runestone_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| SERVER_CONFIG: test | |
| TEST_DBURL: postgresql://runestone:runestone@localhost:5432/runestone_test | |
| DROP_TABLES: "Yes" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Install dependencies | |
| # uv installs the default groups (dev + docs, see [tool.uv] in | |
| # pyproject.toml), matching what `poetry install` pulled in before. | |
| # | |
| # pycairo publishes no Linux wheels, so installing it means compiling | |
| # against system cairo headers the runner doesn't have. It is only here | |
| # transitively (pretext[prefigure] -> prefig[text] -> pycairo) and none | |
| # of these tests touch pretext, so skip it rather than apt-installing | |
| # libcairo2-dev and building a C extension on every run. | |
| run: uv sync --no-install-package pycairo | |
| - name: Create stub static asset directories | |
| run: | | |
| mkdir -p bases/rsptx/assignment_server_api/react | |
| mkdir -p bases/rsptx/assignment_server_api/staticAssets | |
| - name: Run tests | |
| # --no-sync: `uv run` otherwise re-syncs the environment, which would | |
| # undo the pycairo exclusion above and fail the same way. | |
| run: uv run --no-sync pytest -v --tb=short |