IndexStore with support for duplicate keys #192
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: Test | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| concurrency: | |
| cancel-in-progress: true | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| test: | |
| name: Test on Node.js ${{ matrix.node }}${{ matrix.node == '22' && ', Bun,' || '' }} and ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node: [18, 20, 22, 24] | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install Bun | |
| if: ${{ matrix.node == '22' }} | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Setup RocksDB cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: deps/rocksdb | |
| key: ${{ runner.os }}-rocksdb-${{ hashFiles('package.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-rocksdb- | |
| # temporary | |
| - name: Setup extended-iterable cache | |
| id: extended-iterable-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/extended-iterable | |
| key: ${{ runner.os }}-extended-iterable-iterable2 | |
| # temporary | |
| - name: Install extended-iterable | |
| if: steps.extended-iterable-cache.outputs.cache-hit != 'true' | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| run: | | |
| git clone --depth 1 --branch iterable2 https://github.com/harperdb/extended-iterable.git /tmp/extended-iterable | |
| cd /tmp/extended-iterable | |
| pnpm install --no-frozen-lockfile | |
| pnpm build | |
| pnpm link | |
| cd $GITHUB_WORKSPACE | |
| pnpm link @harperdb/extended-iterable | |
| pnpm install --no-frozen-lockfile | |
| # temporary | |
| - name: Link extended-iterable (cache hit) | |
| if: steps.extended-iterable-cache.outputs.cache-hit == 'true' | |
| run: | | |
| cd /tmp/extended-iterable | |
| pnpm link | |
| cd $GITHUB_WORKSPACE | |
| pnpm link @harperdb/extended-iterable | |
| pnpm install --no-frozen-lockfile | |
| - name: Install dependencies | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| run: pnpm install --ignore-scripts | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Build | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| run: pnpm build | |
| - name: Run tests on Node.js ${{ matrix.node }} | |
| run: pnpm coverage | |
| - name: Run tests on Bun | |
| if: ${{ matrix.node == '22' }} | |
| run: bun coverage |