CI/CD Integration

Integrate MockMaster into your continuous integration pipelines.


GitHub Actions

name: Test
 
on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]
 
jobs:
  test:
    runs-on: ubuntu-latest
 
    strategy:
      matrix:
        node-version: [18.x, 20.x]
 
    steps:
      - uses: actions/checkout@v4
 
      - name: Setup Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
          cache: 'npm'
 
      - name: Install dependencies
        run: npm ci
 
      - name: Run unit tests
        run: npm test
 
      - name: Run E2E tests
        run: npx playwright test

Benefits

  • Fast tests - No network calls
  • Deterministic - Same results every time
  • No external dependencies - No API availability issues
  • Version controlled - Scenarios committed with code

Complete Example

See the MASTER_DOCUMENTATION.md for complete CI/CD integration examples.