Add experiment restore script. #1586
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: Check format, build, and run tests | |
| on: [push, pull_request] | |
| jobs: | |
| format: | |
| name: Check format | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install | |
| run: npm install | |
| - name: Check format | |
| run: | | |
| npx prettier --check "**/*.ts" | |
| npx eslint --quiet "**/*.ts" | |
| test: | |
| name: Build backend and run tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Set up Java 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Install firebase | |
| run: | | |
| npm install -g firebase-tools | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build utils | |
| run: npm run build --workspace=utils | |
| - name: Build functions | |
| run: npm run build --workspace=functions | |
| - name: Test utils | |
| run: npm test --workspace=utils | |
| - name: Test functions | |
| run: npm test --workspace=functions | |
| build_frontend: | |
| name: Build frontend and run tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build utils | |
| run: npm run build --workspace=utils | |
| - name: Build frontend | |
| run: | | |
| cp frontend/index.example.html frontend/index.html | |
| cp frontend/firebase_config.example.ts frontend/firebase_config.ts | |
| npm run build --workspace=frontend | |
| - name: Test frontend | |
| run: npm test --workspace=frontend | |
| schemas: | |
| name: Check generated schemas are up to date | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js 22.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: 'npm' | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Install dependencies | |
| run: | | |
| npm install | |
| cd scripts && uv sync | |
| - name: Regenerate schemas | |
| run: npm run update-schemas | |
| - name: Check for diff | |
| run: | | |
| if ! git diff --exit-code docs/assets/api/schemas.json scripts/deliberate_lab/types.py; then | |
| echo "" | |
| echo "Generated schemas are out of date. Please run 'npm run update-schemas' and commit the changes." | |
| exit 1 | |
| fi |