-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.69 KB
/
node16-tests.yml
File metadata and controls
58 lines (51 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# =======================================================================
# Node.js 16 Compatibility Tests Workflow
# =======================================================================
#
# This workflow specifically tests the compatibility of console-table-printer
# and simple-wcswidth packages with Node.js 16.x.
#
# Since Jest 30.x is not compatible with Node.js 16.x, this workflow:
# 1. Removes Jest 30.x
# 2. Installs Jest 29.x which is compatible with Node.js 16
# 3. Runs the unit tests
#
# This ensures that users on Node.js 16.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 16 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:
node16-tests:
name: Node.js 16.x Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js 16.x
uses: actions/setup-node@v4
with:
node-version: '16.x'
cache: 'yarn'
- name: Install dependencies
run: |
# Install specific Jest version that's compatible with Node.js 16
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