Clean up deleted alpha param from condition editor references #1176
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 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 }} | |
| - name: Install | |
| run: npm install | |
| - name: Check format | |
| run: | | |
| npx prettier --check "**/*.ts" | |
| npx eslint --quiet "**/*.ts" | |
| test: | |
| name: Run tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x, 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 }} | |
| - 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 | |
| working-directory: ./utils | |
| run: npm run build | |
| - name: Build functions | |
| working-directory: ./functions | |
| run: npm run build | |
| - name: Test utils | |
| working-directory: ./utils | |
| run: npm test | |
| - name: Test functions | |
| working-directory: ./functions | |
| run: npm test | |
| - name: Test frontend | |
| working-directory: ./frontend | |
| run: npm test | |
| update-schemas: | |
| name: Update generated schemas | |
| runs-on: ubuntu-latest | |
| # Only run on push to main/master, not on PRs | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master') | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Use Node.js 22.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| - 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: Build utils | |
| working-directory: ./utils | |
| run: npm run build | |
| - name: Regenerate schemas | |
| run: | | |
| cd utils && npx tsx src/export-schemas.ts | |
| npx prettier --write ../docs/assets/api/schemas.json | |
| cd ../scripts && uv run datamodel-codegen \ | |
| --input ../docs/assets/api/schemas.json \ | |
| --output deliberate_lab/types.py \ | |
| --input-file-type jsonschema \ | |
| --reuse-model \ | |
| --collapse-root-models \ | |
| --use-union-operator \ | |
| --use-title-as-name \ | |
| --output-model-type pydantic_v2.BaseModel \ | |
| --custom-file-header $'# pyright: reportInvalidTypeForm=false\n# pylint: disable=missing-module-docstring,missing-class-docstring,invalid-name,too-few-public-methods' | |
| - name: Format Python files | |
| run: | | |
| cd scripts && uvx black deliberate_lab/ | |
| - name: Validate generated Python | |
| run: | | |
| cd scripts && uv run pyright deliberate_lab/ | |
| - name: Create PR if schemas changed | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "chore: update generated schemas and Python types" | |
| title: "chore: update generated schemas and Python types" | |
| body: "🤖 Auto-generated by GitHub Actions" | |
| branch: auto-update-schemas | |
| add-paths: | | |
| docs/assets/api/schemas.json | |
| scripts/deliberate_lab/ |