Skip to content

Test

Test #8

Workflow file for this run

name: Test
on:
workflow_dispatch:
# FIXME - enable this after tests are setup
#push:
# branches:
# - main
pull_request_target:
types:
- opened
- reopened
- synchronize
- ready_for_review
paths:
- "packages/**"
- "samples/**"
- "serverless/**"
- "servers/**"
- "starters/**"
- "ai/**"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false
jobs:
test:
name: test (${{ matrix.name }})
runs-on: [ubuntu-latest]
if: (!github.event.pull_request || github.event.pull_request.draft == false)
strategy:
fail-fast: false
matrix:
include:
- name: packages
filter: "./packages/*"
- name: starters
filter: "./starters/*"
- name: servers
filter: "./servers/*"
- name: serverless
filter: "./serverless/*"
- name: ai
filter: "./ai/**"
- name: samples
filter: "./samples/*"
env:
CI: true
BACKSTAGE_CLI_BUILD_PARALLEL: 1
HUSKY_SKIP_HOOKS: 1
HUSKY: 0
NODE_OPTIONS: --max-old-space-size=4096
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Use node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: "pnpm"
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
- name: Test with coverage
run: |
pnpm turbo run test:coverage --filter="${{ matrix.filter }}"
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: nodejs-boot/node-boot
fail_ci_if_error: false
verbose: true
flags: ${{ matrix.name }}