Skip to content

IndexStore with support for duplicate keys #194

IndexStore with support for duplicate keys

IndexStore with support for duplicate keys #194

Workflow file for this run

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: ${{ runner.temp }}/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 ${{ runner.temp }}/extended-iterable
cd ${{ runner.temp }}/extended-iterable
pnpm install --no-frozen-lockfile
pnpm build
cd $GITHUB_WORKSPACE
pnpm add ${{ runner.temp }}/extended-iterable
# temporary
- name: Install extended-iterable from cache
if: steps.extended-iterable-cache.outputs.cache-hit == 'true'
run: |
cd $GITHUB_WORKSPACE
pnpm add ${{ runner.temp }}/extended-iterable
- 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