Skip to main content
Dev · 283 tools

Mock CI Pipeline Config Generator

Generates an example CI pipeline YAML config for testing and learning

CI Pipeline ConfigExample — click Generate for yours
name: PR Checks on: push: branches: [master, develop] paths-ignore: ['docs/**', '**.md'] pull_request: branches: [master] concurrency: group: quarry-subscriptions-${{ github.head_ref || github.run_id }} cancel-in-progress: true permissions: contents: read env: APP_NAME: subscriptions-api TURBO_TEAM: quarry jobs: lint-test-build: name: Node ${{ matrix.node }} runs-on: ubuntu-latest timeout-minutes: 25 strategy: fail-fast: false matrix: node: [20.x, 22.x] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} cache: 'npm' - run: npm ci --ignore-scripts - run: npm run validate:schemas - run: npx eslint . --max-warnings=0 - run: npm run test -- --coverage - run: npm run build:prod - uses: actions/upload-artifact@v4 with: name: quarry-subscriptions-api path: packages/subscriptions/dist/ retention-days: 7

Generated 101 words · 1,046 characters

See 3 examples
  • Example 1
    name: PR Checks
    
    on:
      push:
        branches: [master, develop]
        paths-ignore: ['docs/**', '**.md']
      pull_request:
        branches: [master]
    
    concurrency:
      group: quarry-subscriptions-${{ github.head_ref || github.run_id }}
      cancel-in-progress: true
    
    permissions:
      contents: read
    
    env:
      APP_NAME: subscriptions-api
      TURBO_TEAM: quarry
    
    jobs:
      lint-test-build:
        name: Node ${{ matrix.node }}
        runs-on: ubuntu-latest
        timeout-minutes: 25
        strategy:
          fail-fast: false
          matrix:
            node: [20.x, 22.x]
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-node@v4
            with:
              node-version: ${{ matrix.node }}
              cache: 'npm'
          - run: npm ci --ignore-scripts
          - run: npm run validate:schemas
          - run: npx eslint . --max-warnings=0
          - run: npm run test -- --coverage
          - run: npm run build:prod
          - uses: actions/upload-artifact@v4
            with:
              name: quarry-subscriptions-api
              path: packages/subscriptions/dist/
              retention-days: 7
  • Example 2
    name: recommendations-backend CI
    
    on:
      push:
        branches: [main, beta]
        paths-ignore: ['docs/**', '**.md']
      pull_request:
        branches: [main]
    
    concurrency:
      group: ${{ github.workflow }}-recommendations-${{ github.ref }}
      cancel-in-progress: true
    
    permissions:
      contents: read
    
    env:
      APP_NAME: recommendations-backend
      DATABASE_URL: postgres://ci:ci@localhost:5432/recommendations_test
    
    jobs:
      lint-test-build:
        name: Build and test
        runs-on: ubuntu-latest
        timeout-minutes: 10
        strategy:
          fail-fast: false
          matrix:
            node: [20, lts/*]
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-node@v4
            with:
              node-version: ${{ matrix.node }}
              cache: 'npm'
          - run: npm ci --ignore-scripts
          - run: npm run lint
          - run: npm run format:check
          - run: npx vitest run --coverage
          - run: npm run build:prod
          - uses: actions/upload-artifact@v4
            with:
              name: oakridge-recommendations-backend
              path: build/
              retention-days: 14
  • Example 3
    name: inventory-service CI
    
    on:
      push:
        branches: [main, next]
        paths-ignore: ['docs/**', '**.md']
      pull_request:
        branches: [main]
    
    concurrency:
      group: emberly-inventory-${{ github.head_ref || github.run_id }}
      cancel-in-progress: true
    
    permissions:
      contents: read
    
    env:
      APP_NAME: inventory-service
      TURBO_TEAM: emberly
    
    jobs:
      ci:
        name: Build inventory (${{ matrix.node }})
        runs-on: ubuntu-latest
        timeout-minutes: 25
        strategy:
          fail-fast: false
          matrix:
            node: [20.x, 22.x]
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-node@v4
            with:
              node-version: ${{ matrix.node }}
              cache: 'npm'
          - run: npm ci
          - run: npm audit --omit=dev
          - run: npm run lint && npm run format:check
          - run: npm run test -- --coverage
          - run: npm run build
          - uses: actions/upload-artifact@v4
            with:
              name: inventory-service-${{ matrix.node }}
              path: out/
              retention-days: 3

About this generator

GitHub Actions workflows have a precise YAML structure — triggers, job declarations, runner specifications, and steps — and writing one from memory for a tutorial or a new project always means looking up which key goes where. This tool generates an example CI workflow that covers the common steps: checkout, Node.js setup, npm ci, lint, test, and build, triggered on pushes to main and on pull requests. There are no inputs. Each run invents a project (an app name such as billing-api and an organization) and builds a Node.js workflow around it: a workflow name, push and pull_request triggers with branch filters and paths-ignore, a concurrency group that cancels superseded runs, read-only permissions, an env block with the app name and a project-specific variable, and one job on ubuntu-latest with a timeout and a Node version matrix (for example 18 and 20, 20 and 22, or lts/*). Steps check out the code, set up Node with npm, Yarn, or pnpm caching, install dependencies, run lint, a second check such as type checking, formatting, or a dependency audit, test, and build, then upload the build output as an artifact. Copy the YAML into .github/workflows/ to use it as a scaffold, or paste it into documentation and tutorials. YAML indentation is significant — two spaces per level — so preserve the indentation exactly when you edit. Adapt the Node version, step commands, and any secrets or environment variables to your own project before relying on the pipeline.

How to use

  1. Click Generate to produce a CI config.
  2. Copy the YAML into a workflow file.
  3. Adapt the steps to your project.
  4. Mind the significant indentation.

Use Cases

  • •Learning CI pipeline config
  • •Documenting a CI workflow
  • •Demoing pipeline structure
  • •Seeding an example workflow
  • •Testing a YAML parser

Tips

  • →YAML indentation is significant.
  • →Adapt the steps to your project.
  • →CI catches problems early.
  • →Match tool versions to your setup.

FAQ

what does the generated workflow include

A GitHub Actions workflow with push and pull_request triggers, a concurrency group, read-only permissions, and an env block for a generated app name. A single job runs on ubuntu-latest with a Node version matrix, checks out the code (actions/checkout@v4), sets up Node (actions/setup-node@v4) with npm, Yarn, or pnpm caching, then installs, lints, runs an extra check, tests, builds, and uploads the build folder with actions/upload-artifact@v4.

can I use this for a non-node project

The generated config is Node-specific — it uses npm, Yarn, or pnpm commands. For Python, Go, or other stacks you would replace the setup action and all the run steps with the appropriate equivalents. Use the generated YAML to understand the structure, then swap in your language's toolchain.

why does yaml indentation matter so much in ci configs

YAML uses indentation (spaces, never tabs) to express nesting. In a workflow file, a step indented under steps is part of the job; if the indentation is wrong by even two spaces, the YAML parser sees a different structure entirely and GitHub Actions rejects the workflow with a parse error.

how is a github actions workflow different from a gitlab ci or circleci config

All three use YAML to define pipelines but with different top-level structures and keywords. GitHub Actions uses 'on' triggers, 'jobs', and 'steps'. GitLab CI uses 'stages' and jobs with 'script' keys. CircleCI uses 'workflows' and 'jobs' with 'steps'. This generator produces GitHub Actions syntax only.

You might also like

Popular tools from other categories that share themes with this one.