feat: implement Docker stack module for local backend management #5
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: PR Checks | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - development | |
| concurrency: | |
| group: pr-checks-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| # ── CLI: Build + Type check ───────────────────────────────────────────────── | |
| cli-build: | |
| name: CLI Build | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: cli | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: cli/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Type check | |
| run: npx tsc --noEmit | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cli-dist | |
| path: cli/dist | |
| retention-days: 1 | |
| # ── CLI: Unit tests ───────────────────────────────────────────────────────── | |
| cli-unit-tests: | |
| name: CLI Unit Tests | |
| runs-on: ubuntu-latest | |
| needs: cli-build | |
| defaults: | |
| run: | |
| working-directory: cli | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: cli/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run unit tests | |
| run: npm run test | |
| # ── CLI: E2E tests (requires Docker) ─────────────────────────────────────── | |
| cli-e2e-tests: | |
| name: CLI E2E Tests | |
| runs-on: ubuntu-latest | |
| needs: cli-build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: cli/package-lock.json | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Start Docker daemon and verify | |
| run: | | |
| sudo systemctl start docker || true | |
| docker version | |
| docker info | |
| - name: Pull PostgreSQL image (cache warm-up) | |
| run: docker pull postgres:16-alpine | |
| - name: Install dependencies | |
| working-directory: cli | |
| run: npm ci | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: cli-dist | |
| path: cli/dist | |
| - name: Run E2E tests | |
| working-directory: cli | |
| run: npm run test:e2e | |
| env: | |
| TESTCONTAINERS_RYUK_DISABLED: true | |
| DOCKER_HOST: unix:///var/run/docker.sock | |