slint/.github/workflows/node_test_reusable.yaml
dependabot[bot] a5edad54ea
build(deps): bump actions/checkout in the github-actions group (#10141)
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 5 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 09:46:23 +02:00

62 lines
2.4 KiB
YAML

# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
name: Node.js Test (Reusable)
on:
workflow_call:
inputs:
name:
description: 'Name of the job'
required: true
type: string
os:
description: 'Operating system to run on'
required: true
type: string
env:
RUSTFLAGS: -D warnings
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_INCREMENTAL: false
RUST_BACKTRACE: 1
jobs:
node_test:
name: ${{ inputs.name }}
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/install-linux-dependencies
- uses: ./.github/actions/install-skia-dependencies
- name: Setup headless display
if: runner.os != 'macOS'
uses: pyvista/setup-headless-display-action@v4
- uses: actions/setup-node@v6
with:
node-version: 20
package-manager-cache: false
id: node-install
- uses: pnpm/action-setup@v4.2.0
with:
version: 10.18.2
- uses: ./.github/actions/setup-rust
with:
key: x-napi-v2-${{ steps.node-install.outputs.node-version }} # the cache key consists of a manually bumpable version and the node version, as the cached rustc artifacts contain linking information where to find node.lib, which is in a versioned directory.
- name: Run pnpm install
working-directory: api/node
run: pnpm install --frozen-lockfile
- name: Build node plugin in debug
run: pnpm build:testing
working-directory: api/node
- name: Run node tests
working-directory: api/node
run: pnpm test
- name: Run test-driver-nodejs
# Release is only applied to the harness that drives the node.js invocations, but needed
# to avoid crashing on Windows with what looks like an out of stack exception.
run: cargo test --verbose --release --all-features -p test-driver-nodejs
- name: Check image-filter example
working-directory: examples/imagefilter/node
run: pnpm check