chore: update README with new methods #21
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, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| node-version: [22, 24] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Cache node-gyp | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/node-gyp | |
| ~/.node-gyp | |
| build/ | |
| key: ${{ runner.os }}-node-gyp-${{ matrix.node-version }}-${{ hashFiles('binding.gyp', 'deps/**') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node-gyp-${{ matrix.node-version }}- | |
| ${{ runner.os }}-node-gyp- | |
| - name: Cache apt packages (Ubuntu) | |
| if: runner.os == 'Linux' | |
| uses: actions/cache@v4 | |
| with: | |
| path: /var/cache/apt | |
| key: ${{ runner.os }}-apt-${{ hashFiles('.github/workflows/ci.yml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-apt- | |
| - name: Install system dependencies (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake | |
| - name: Install system dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| # Ensure Xcode command line tools are installed | |
| xcode-select --install 2>/dev/null || true | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build native module | |
| run: npm run build | |
| - name: Run basic tests | |
| run: npm test | |
| - name: Run family tests | |
| run: npm run test-families | |
| - name: Run lazy initialization tests | |
| run: npm run test-lazy | |
| - name: Run comprehensive example | |
| run: npm run example-comprehensive | |
| build-only: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| node-version: [22, 24] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Cache node-gyp | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/node-gyp | |
| ~/.node-gyp | |
| build/ | |
| key: ${{ runner.os }}-node-gyp-${{ matrix.node-version }}-${{ hashFiles('binding.gyp', 'deps/**') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node-gyp-${{ matrix.node-version }}- | |
| ${{ runner.os }}-node-gyp- | |
| - name: Setup Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build native module | |
| run: npm run build | |
| - name: Run basic tests | |
| run: npm test |