Skip to content

Commit 9a3f6eb

Browse files
committed
Added sharding for linux. Enable linux. Split MacOS and Linux tests
1 parent 57dfb61 commit 9a3f6eb

2 files changed

Lines changed: 44 additions & 8 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Test all on Demand (Linux)
5+
6+
on:
7+
push:
8+
# schedule:
9+
# - cron: '0 0 * * 0' # Every Sunday at midnight UTC
10+
workflow_dispatch:
11+
12+
jobs:
13+
build-and-test:
14+
runs-on: ${{ matrix.os }}
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
os: [ubuntu-latest]
20+
# os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest]
21+
shard: ["1/20", "2/20", "3/20", "4/20", "5/20", "6/20", "7/20", "8/20", "9/20", "10/20", "11/20", "12/20", "13/20", "14/20", "15/20", "16/20", "17/20", "18/20", "19/20", "20/20"]
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Use Node.js 24
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '24.x'
29+
cache: 'npm'
30+
- name: Enable linger for admin user (Linux only)
31+
if: runner.os == 'Linux'
32+
run: loginctl enable-linger $(whoami)
33+
34+
- run: npm ci
35+
- run: npx tsx scripts/cleanup-github-actions.ts
36+
37+
# - name: Setup tmate session
38+
# uses: mxschmitt/action-tmate@v3
39+
40+
- name: Run tests (Linux)
41+
if: runner.os == 'Linux'
42+
run: npm run test -- ./test --no-file-parallelism --silent=passed-only --shard ${{ matrix.shard }}
43+

.github/workflows/run-all-unit-tests.yaml renamed to .github/workflows/run-all-unit-tests-macos.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
22
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
33

4-
name: Test all on Demand
4+
name: Test all on Demand (MacOS)
55

66
on:
77
push:
@@ -27,9 +27,6 @@ jobs:
2727
with:
2828
node-version: '24.x'
2929
cache: 'npm'
30-
- name: Enable linger for admin user (Linux only)
31-
if: runner.os == 'Linux'
32-
run: loginctl enable-linger $(whoami)
3330

3431
- run: npm ci
3532
- run: npx tsx scripts/cleanup-github-actions.ts
@@ -53,7 +50,3 @@ jobs:
5350
5451
npm run test -- ./test --no-file-parallelism --disable-console-intercept --exclude ./test/homebrew --shard ${{ matrix.shard }}
5552
56-
- name: Run tests (Linux)
57-
if: runner.os == 'Linux'
58-
run: npm run test -- ./test --no-file-parallelism --silent=passed-only --shard ${{ matrix.shard }}
59-

0 commit comments

Comments
 (0)