feat: Adds span labeling pipeline with prompt references, exponential magnitude slider, and 10 jsPsych plugins #36
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # TypeScript jobs | |
| ts-check: | |
| name: TypeScript Check (Biome) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: bead/deployment/jspsych | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| cache-dependency-path: bead/deployment/jspsych/pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run Biome check (lint + format) | |
| run: pnpm check | |
| ts-typecheck: | |
| name: TypeScript Type Check | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: bead/deployment/jspsych | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| cache-dependency-path: bead/deployment/jspsych/pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run type check | |
| run: pnpm typecheck | |
| ts-build: | |
| name: TypeScript Build | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: bead/deployment/jspsych | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| cache-dependency-path: bead/deployment/jspsych/pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build TypeScript | |
| run: pnpm build | |
| ts-test: | |
| name: TypeScript Test | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: bead/deployment/jspsych | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| cache-dependency-path: bead/deployment/jspsych/pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run tests | |
| run: pnpm test | |
| # Python jobs | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install ruff | |
| run: pip install ruff | |
| - name: Run ruff linter | |
| run: ruff check . | |
| format: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install ruff | |
| run: pip install ruff | |
| - name: Check formatting | |
| run: ruff format --check . | |
| typecheck: | |
| name: Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -e ".[dev,behavioral-analysis]" | |
| - name: Run pyright | |
| run: pyright | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| needs: [ts-build] # Python tests need TypeScript compiled | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| cache-dependency-path: bead/deployment/jspsych/pnpm-lock.yaml | |
| - name: Install TypeScript dependencies | |
| working-directory: bead/deployment/jspsych | |
| run: pnpm install | |
| - name: Build TypeScript | |
| working-directory: bead/deployment/jspsych | |
| run: pnpm build | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Cache pip packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Create virtual environment | |
| run: python -m venv .venv | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Install dependencies in venv | |
| run: | | |
| .venv/bin/pip install --upgrade pip | |
| .venv/bin/pip install -e ".[dev,api,training,stats,behavioral-analysis]" | |
| - name: Set up test fixtures | |
| run: | | |
| mkdir -p tests/fixtures/cli_work | |
| cp -r tests/fixtures/api_docs/* tests/fixtures/cli_work/ | |
| - name: Run tests | |
| run: .venv/bin/pytest --codeblocks --cov=bead --cov-report=xml --cov-report=term-missing -m "not slow_model_training" | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./coverage.xml | |
| fail_ci_if_error: false | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |