Skip to content

test message

test message #15

Workflow file for this run

# =======================================================================
# Node.js 12 Compatibility Tests Workflow
# =======================================================================
#
# This workflow specifically tests the compatibility of console-table-printer
# and simple-wcswidth packages with Node.js 12.x.
#
# Since Jest 30.x is not compatible with Node.js 12.x, this workflow:
# 1. Removes Jest 30.x
# 2. Installs Jest 27.x which is compatible with Node.js 12
# 3. Runs the unit tests
#
# This ensures that users on Node.js 12.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
#
# Test results are uploaded as artifacts and stored for 7 days.
# =======================================================================
name: Node.js 12 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:
node12-tests:
name: Node.js 12.x Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js 12.x
uses: actions/setup-node@v4
with:
node-version: '12.x'
cache: 'yarn'
- name: Install dependencies
run: |
# Remove incompatible Jest 30.x
yarn remove jest
# Install Jest 27.x which is compatible with Node.js 12
yarn add jest@27 --dev
- name: Run unit tests
run: yarn test:unit
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: node12-test-results
path: |
junit.xml
retention-days: 7