ci: add Node.js version matrix, caching, and lint step to test workflow

Open Beginner friendly
#2,322 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
github-actions, javascript, nodejs

Research direction

Start with .github/workflows/test.yml and inspect the existing test job, then compare its Node.js version with the Volta configuration mentioned in the issue. Update the workflow to cover the requested Node.js versions, dependency caching, current action versions, and the web lint command; run the workflow or its equivalent checks to confirm build, lint, and tests pass for every matrix entry.

Written by the indexing model from the issue text.

Description

Problem

The CI workflow at .github/workflows/test.yml has several gaps:

  1. Only tests on Node.js 22.x (volta config says 16 — mismatch)
  2. No dependency caching between runs (slow CI)
  3. No lint step in CI (eslint only runs via pre-commit hook)
  4. Uses actions/checkout@v2 and actions/setup-node@v2 (both outdated)

Suggested Fix

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [18.x, 20.x, 22.x]
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-node@v4
      with:
        node-version: ${{ matrix.node-version }}
        cache: 'yarn'
    - run: yarn install --frozen-lockfile
    - run: cd packages/web && yarn build
    - run: cd packages/web && yarn lint
    - run: cd packages/web && yarn test --verbose --maxWorkers=2

Severity

Medium — CI reliability and speed

Dominant language
JavaScript
Stars
4.9k
Forks
477
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from appbaseio/reactivesearch

All issues in appbaseio/reactivesearch

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.