|
| 1 | +name: CI (backend - execution service) |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: [dev, staging] |
| 6 | + paths: |
| 7 | + - "backend/execution-service/**" |
| 8 | + - "pnpm-lock.yaml" |
| 9 | + - "package.json" |
| 10 | + - ".github/workflows/ci-execution-service.yml" |
| 11 | + push: |
| 12 | + branches: [dev, staging] |
| 13 | + paths: |
| 14 | + - "backend/execution-service/**" |
| 15 | + - "pnpm-lock.yaml" |
| 16 | + - "package.json" |
| 17 | + - ".github/workflows/ci-execution-service.yml" |
| 18 | + |
| 19 | +concurrency: |
| 20 | + group: ci-${{ github.workflow }}-${{ github.ref }} |
| 21 | + cancel-in-progress: true |
| 22 | + |
| 23 | +jobs: |
| 24 | + build-test: |
| 25 | + name: Build |
| 26 | + runs-on: ubuntu-latest |
| 27 | + env: |
| 28 | + CI: true |
| 29 | + services: |
| 30 | + mongodb: |
| 31 | + image: mongo:8 |
| 32 | + ports: |
| 33 | + - 27017:27017 |
| 34 | + |
| 35 | + steps: |
| 36 | + - name: Checkout |
| 37 | + uses: actions/checkout@v4 |
| 38 | + |
| 39 | + - name: Setup Node |
| 40 | + uses: actions/setup-node@v4 |
| 41 | + with: |
| 42 | + node-version: "20.x" |
| 43 | + |
| 44 | + - name: Enable Corepack & pin pnpm |
| 45 | + run: | |
| 46 | + corepack enable |
| 47 | + corepack prepare [email protected] --activate |
| 48 | + pnpm -v |
| 49 | +
|
| 50 | + - name: Install deps (workspace root) |
| 51 | + run: pnpm install --frozen-lockfile |
| 52 | + |
| 53 | + |
| 54 | + - name: Lint (execution service) |
| 55 | + run: pnpm --filter execution-service lint |
| 56 | + |
| 57 | + - name: Set up Docker Buildx |
| 58 | + uses: docker/setup-buildx-action@v3 |
| 59 | + |
| 60 | + - name: Build Docker image |
| 61 | + uses: docker/build-push-action@v6 |
| 62 | + with: |
| 63 | + context: backend/execution-service |
| 64 | + file: backend/execution-service/Dockerfile.execution |
| 65 | + push: false |
| 66 | + tags: execution-service:test |
| 67 | + cache-from: type=gha |
| 68 | + cache-to: type=gha,mode=max |
0 commit comments