-
-
Notifications
You must be signed in to change notification settings - Fork 11
77 lines (72 loc) · 2.18 KB
/
Copy pathtest.yml
File metadata and controls
77 lines (72 loc) · 2.18 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
71
72
73
74
75
76
77
name: Test
on: [push, pull_request]
# Tests only read the repo; no write scopes needed
permissions:
contents: read
concurrency:
group: ${{ github.ref_name }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
test:
if: github.event_name != 'push' || github.ref_name == github.event.repository.default_branch
strategy:
fail-fast: false
matrix:
node_version: ["18", "20", "24"]
java_version: ["8", "11", "17", "21", "25"]
java_distrib: [temurin]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- node_version: "18"
java_version: "17"
java_distrib: adopt
os: ubuntu-latest
exclude:
# excludes node 8 on macOS
- os: macos-latest
java_version: "8"
name: Test
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- name: Checkout Code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
persist-credentials: false
- name: Install node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: ${{ matrix.node_version }}
- name: Install Java
uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5
with:
distribution: ${{ matrix.java_distrib }}
java-version: ${{ matrix.java_version }}
- name: Install dependencies and link
run: npm ci
- name: Run tests
env:
DEBUG: java-caller,njre
run: npm run test
test-no-java:
name: Test - No Java
strategy:
matrix:
debian_version: [bookworm]
node_version: ["18"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
container:
image: "node:${{ matrix.node_version }}-${{ matrix.debian_version }}"
timeout-minutes: 15
steps:
- name: Checkout Code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
persist-credentials: false
- name: Install dependencies and link
run: npm ci
- name: Run tests
env:
DEBUG: "java-caller"
run: npm run test