Week 3: Extract runtime infrastructure to @objectstack/runtime and isolate query logic #922
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: CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 6 | |
| services: | |
| redis: | |
| image: redis | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v3 | |
| with: | |
| version: 10 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'pnpm' | |
| - name: Cache MongoDB Binary | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/mongodb-binaries | |
| key: mongodb-binaries-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| mongodb-binaries-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| timeout-minutes: 2 | |
| - name: Setup MongoDB Memory Server | |
| run: | | |
| # Pre-download MongoDB binary for mongodb-memory-server | |
| # This allows integration tests to run without network access during tests | |
| cd packages/drivers/mongo | |
| npx mongodb-memory-server preinstall || echo "MongoDB binary download failed, tests will skip gracefully" | |
| timeout-minutes: 1 | |
| continue-on-error: true | |
| - name: Build packages | |
| run: pnpm run build | |
| timeout-minutes: 3 | |
| - name: Run tests | |
| run: pnpm run test | |
| timeout-minutes: 5 |