-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.51 KB
/
run-all-unit-tests.yaml
File metadata and controls
52 lines (42 loc) · 1.51 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
# 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
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Test all on Demand
on:
push:
# schedule:
# - cron: '0 0 * * 0' # Every Sunday at midnight UTC
workflow_dispatch:
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
# os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: '24.x'
cache: 'npm'
- name: Enable linger for admin user (Linux only)
if: runner.os == 'Linux'
run: loginctl enable-linger $(whoami)
- run: npm ci
- run: npx tsx scripts/cleanup-github-actions.ts
- name: Run tests (macOS - zsh login shell)
if: runner.os == 'macOS'
shell: zsh {0}
run: |
sudo chsh -s $(which zsh) $USER
echo $0
echo $ZSH_NAME $ZSH_VERSION
export SHELL=/bin/zsh
npm run test -- ./test/shell --no-file-parallelism --silent=passed-only
- name: Run tests (Linux)
if: runner.os == 'Linux'
run: npm run test -- ./test --no-file-parallelism --silent=passed-only
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3