feat: implement job execution lifecycle handling in worker #7
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] | |
| jobs: | |
| lint-and-typecheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - name: Build shared packages | |
| run: npx turbo run build --filter=@taskflow/shared --filter=@taskflow/db --filter=@taskflow/queue | |
| - name: Typecheck | |
| run: npx turbo run typecheck | |
| docker-build: | |
| runs-on: ubuntu-latest | |
| needs: lint-and-typecheck | |
| strategy: | |
| matrix: | |
| service: [api, worker, scheduler, dashboard] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Docker image | |
| run: docker build -f apps/${{ matrix.service }}/Dockerfile -t taskflow-${{ matrix.service }}:ci . |