fix: prevent MissingGreenlet error on task board query (#20) #102
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] | |
| env: | |
| PYTHON_VERSION: '3.11' | |
| NODE_VERSION: '20' | |
| PNPM_VERSION: '8' | |
| jobs: | |
| lint-and-type-check: | |
| name: Lint & type check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache: pip | |
| - name: Install packages | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ruff | |
| pip install -e "packages/flowforge-sdk[all]" | |
| pip install -e packages/flowforge-cli | |
| pip install -e server | |
| - name: Lint (ruff) | |
| run: ruff check . | |
| test-python: | |
| name: Python tests | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: flowforge | |
| POSTGRES_PASSWORD: flowforge | |
| POSTGRES_DB: flowforge_test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| redis: | |
| image: redis:7 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 6379:6379 | |
| env: | |
| FLOWFORGE_DATABASE_URL: postgresql://flowforge:flowforge@localhost:5432/flowforge_test | |
| FLOWFORGE_REDIS_URL: redis://localhost:6379 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache: pip | |
| - name: Install packages | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e "packages/flowforge-sdk[all]" | |
| pip install -e packages/flowforge-cli | |
| pip install -e server | |
| pip install pytest pytest-asyncio | |
| - name: Run unit tests | |
| run: pytest tests/unit -v | |
| test-dashboard: | |
| name: Dashboard build & lint | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: dashboard | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: ${{ env.PNPM_VERSION }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: pnpm | |
| cache-dependency-path: dashboard/pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| run: pnpm build |