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: lint: name: Lint runs-on: ubuntu-latest timeout-minutes: 10 steps: - name: Checkout Code uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Install node uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: "26" - name: Install dependencies run: npm ci - name: Run lint run: npm run lint test: if: github.event_name != 'push' || github.ref_name == github.event.repository.default_branch strategy: fail-fast: false matrix: node_version: ["22", "24", "26"] java_version: ["8", "11", "17", "21", "25"] java_distrib: [temurin] os: [ubuntu-latest, macos-latest, windows-latest] include: - node_version: "26" java_version: "17" java_distrib: zulu 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Install node uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: ${{ matrix.node_version }} - name: Install Java uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0 with: distribution: ${{ matrix.java_distrib }} java-version: ${{ matrix.java_version }} - name: Install dependencies and link run: npm ci - name: Run tests env: NODE_DEBUG: java-caller run: npm run test test-no-java: name: Test - No Java strategy: matrix: debian_version: [bookworm] node_version: ["26"] 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Install dependencies and link run: npm ci - name: Run tests env: NODE_DEBUG: "java-caller" run: npm run test