42 lines
868 B
YAML
42 lines
868 B
YAML
name: Reusable Node Checks
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
node_version:
|
|
type: string
|
|
default: "22"
|
|
install_command:
|
|
type: string
|
|
default: "npm ci"
|
|
typecheck_command:
|
|
type: string
|
|
default: "npm run typecheck"
|
|
test_command:
|
|
type: string
|
|
default: "npm test"
|
|
build_command:
|
|
type: string
|
|
default: "npm run build"
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: docker
|
|
container:
|
|
image: node:${{ inputs.node_version }}-alpine
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: ${{ inputs.install_command }}
|
|
|
|
- name: Typecheck
|
|
run: ${{ inputs.typecheck_command }}
|
|
|
|
- name: Run tests
|
|
run: ${{ inputs.test_command }}
|
|
|
|
- name: Build
|
|
run: ${{ inputs.build_command }} |