Better sync docs #83
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, v10 ] | |
| pull_request: | |
| branches: [ main, v10 ] | |
| jobs: | |
| test: | |
| name: Test on Node ${{ matrix.node-version }} and ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| node-version: [20.x, 22.x, 24.x] | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - name: Checkout code | |
| 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 | |
| shell: bash | |
| - name: Run isolation check | |
| run: npm run test:isolation | |
| shell: bash | |
| - name: Setup integrations | |
| run: npm run integration:setup | |
| shell: bash | |
| - name: Run linting | |
| run: npm run check | |
| shell: bash | |
| - name: Run tests | |
| run: npm run test | |
| - name: Run build tests | |
| run: npm run test:builds | |
| - name: Build package | |
| run: npm run build | |
| - name: Check build outputs exist | |
| run: | | |
| test -f dist/index.esm.js | |
| test -f dist/index.umd.js | |
| test -f dist/index.d.ts | |
| shell: bash | |
| coverage: | |
| name: Coverage Report | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| shell: bash | |
| - name: Setup integrations | |
| run: npm run integration:setup | |
| shell: bash | |
| - name: Run tests with coverage | |
| run: npm run test:coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| file: ./coverage/coverage-final.json | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| performance: | |
| name: Performance Benchmarks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| shell: bash | |
| - name: Run isolation check | |
| run: npm run test:isolation | |
| shell: bash | |
| - name: Setup integrations | |
| run: npm run integration:setup | |
| shell: bash | |
| - name: Build package | |
| run: npm run build | |
| - name: Run performance tests | |
| run: npm run test:performance | |
| - name: Upload performance results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: performance-results | |
| path: performance-tests/ | |
| retention-days: 30 | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| shell: bash | |
| - name: Run linting | |
| run: npm run check | |
| shell: bash | |
| - name: Run isolation check | |
| run: npm run test:isolation | |
| shell: bash | |
| - name: Setup integrations | |
| run: npm run integration:setup | |
| shell: bash | |
| - name: Run security audit | |
| run: npm audit --audit-level moderate | |
| - name: Check for known vulnerabilities | |
| run: npx audit-ci --moderate |