PI fixes from live class testing #112
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. | |
| run: uv sync | |
| - 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 | |
| run: uv run pytest -v --tb=short |