Skip to main content

Node.js

Running the pre-built Node.js pipeline directly

Run the following command to run the pre-built Node.js Pipeline without having to initialize a project:

fluentci run nodejs test

Add Bun Pipeline to your project

Run the following command to add Bun pipeline to your project:

fluentci init -t nodejs

This will create a .fluentci directory in your project, feel free to customize the pipeline for your needs. You can then run the following command to start the pipeline:

fluentci run .

Or simply:

fluentci

Environment variables

VariableDescriptionDefault
NODE_VERSIONNode version to use18.16.1
PACKAGE_MANAGERPackage manager to use (npm, yarn, pnpm)npm

Jobs

JobDescription
testRun the tests
buildBuild the project

Programmatic usage

You can also use this pipeline programmatically:

import { test, build } from "jsr:@fluentci/nodejs";

await test();
await build();

CI/CD pipeline integrations

The following examples show how to integrate FluentCI with popular CI providers to build and test Node.js applications:

ci.yml
name: ci
on:
push:
branches:
- main
jobs:
tasks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Fluent CI
uses: fluentci-io/setup-fluentci@v5
- name: test
run: fluentci run --wasm nodejs test
- name: build
run: fluentci run --wasm nodejs build