-
Notifications
You must be signed in to change notification settings - Fork 41
70 lines (59 loc) · 1.9 KB
/
test.yml
File metadata and controls
70 lines (59 loc) · 1.9 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
59
60
61
62
63
64
65
66
67
68
69
70
name: Tests
on: [push, pull_request, workflow_dispatch]
env:
FORCE_COLOR: 2
NODE_COV: 24 # The Node.js version to run coveralls on
jobs:
test:
name: Node ${{ matrix.node }} - ${{ matrix.architecture }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [18, 20, 22, 24]
java: [25]
architecture: [x64]
include:
- os: macos-latest
node: 24
java: 25
architecture: x64
- os: windows-latest
node: 24
java: 25
architecture: x64
- os: windows-latest
node: 22
java: 17
architecture: x86
steps:
- name: Clone repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: ${{ matrix.node }}
architecture: ${{ matrix.architecture }}
cache: npm
- name: Set up Java
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: "temurin"
architecture: ${{ matrix.architecture }}
java-version: ${{ matrix.java }}
- name: Install npm dependencies
run: npm ci
- name: Run full tests
run: npm run test:coverage
if: "!startsWith(matrix.os, 'windows')"
- name: Run tests
run: npm run mocha
if: startsWith(matrix.os, 'windows')
- name: Run Coveralls
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
if: startsWith(matrix.os, 'ubuntu') && matrix.node == env.NODE_COV
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"