Skip to content

Node.js 14 Tests

Node.js 14 Tests #101

Workflow file for this run

# =======================================================================
# Node.js 14 Compatibility Tests Workflow
# =======================================================================
#
# This workflow specifically tests the compatibility of console-table-printer
# and simple-wcswidth packages with Node.js 14.x.
#
# Since Jest 30.x is not compatible with Node.js 14.x, this workflow:
# 1. Removes Jest 30.x
# 2. Installs Jest 29.x which is compatible with Node.js 14
# 3. Runs the unit tests
#
# This ensures that users on Node.js 14.x can still use these libraries
# even though the latest testing tools may not support this version.
#
# The workflow runs:
# - Daily at 00:00 UTC
# - On push to main branch
# - Manually via workflow_dispatch
#
# =======================================================================
name: Node.js 14 Tests
on:
schedule:
# Run once a day at midnight UTC
- cron: '0 0 * * *'
# Also run on push to main branch
push:
branches: [ main ]
# Allow manual triggering
workflow_dispatch:
jobs:
node14-tests:
name: Node.js 14.x Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js 14.x
uses: actions/setup-node@v4
with:
node-version: '14.x'
cache: 'yarn'
- name: Install dependencies
run: |
# Install specific Jest version that's compatible with Node.js 14
yarn add jest@29.5.0 ts-jest@29.1.0 @types/jest@29.5.0 --dev
# Install without considering yarn.lock to ensure our custom Jest version is actually used
yarn install --no-lockfile
- name: Run unit tests
run: yarn test