CI/CD Pipeline

PR Ready

Lint → parallel tests → Docker build → staging → approval → production.

7 nodes · 7 edgespr ready
github-actionscicddockerdeployment
Visual
Lint & Type Checkcicd

Run ESLint and TypeScript compiler in strict mode.

parallelUnit Tests
parallelIntegration Tests
Unit Testscicd

Run Jest unit tests with coverage threshold.

sequentialBuild Docker Image
Integration Testscicd

Run Playwright integration tests against test database.

sequentialBuild Docker Image
Build Docker Imagedocker

Build and push multi-arch image to GHCR.

sequentialDeploy to Staging
Deploy to Staginginfra

Deploy the new image to the staging environment.

sequentialProduction Approval
Production Approvalhuman

Team lead reviews staging and approves production deploy.

sequentialDeploy to Production
Deploy to Productioninfra

Blue-green deploy to production with automatic rollback.

ex-github-actions-ci-cd.osop.yaml
# GitHub Actions CI/CD — OSOP Portable Workflow
#
# Full CI/CD pipeline: lint and type-check, run unit and integration tests
# in parallel, build a Docker image, deploy to staging, wait for manual
# approval, then promote to production.
#
# Use alongside .github/workflows/ or validate: osop validate github-actions-ci-cd.osop.yaml

osop_version: "1.0"
id: "github-actions-ci-cd"
name: "CI/CD Pipeline"
description: "Lint → parallel tests → Docker build → staging → approval → production."
version: "1.0.0"
tags: [github-actions, cicd, docker, deployment]

nodes:
  - id: "lint"
    type: "cicd"
    subtype: "test"
    name: "Lint & Type Check"
    description: "Run ESLint and TypeScript compiler in strict mode."
    config:
      commands: ["npx eslint .", "npx tsc --noEmit"]

  - id: "unit_tests"
    type: "cicd"
    subtype: "test"
    name: "Unit Tests"
    description: "Run Jest unit tests with coverage threshold."
    config:
      command: "npx jest --coverage --ci"
      coverage_threshold: 80

  - id: "integration_tests"
    type: "cicd"
    subtype: "test"
    name: "Integration Tests"
    description: "Run Playwright integration tests against test database."
    config:
      command: "npx playwright test"

  - id: "build_docker"
    type: "docker"
    name: "Build Docker Image"
    description: "Build and push multi-arch image to GHCR."
    config:
      registry: "ghcr.io"
      platforms: ["linux/amd64", "linux/arm64"]

  - id: "deploy_staging"
    type: "infra"
    name: "Deploy to Staging"
    description: "Deploy the new image to the staging environment."
    config:
      environment: "staging"
      strategy: "rolling"

  - id: "approval_gate"
    type: "human"
    subtype: "review"
    name: "Production Approval"
    description: "Team lead reviews staging and approves production deploy."

  - id: "deploy_production"
    type: "infra"
    name: "Deploy to Production"
    description: "Blue-green deploy to production with automatic rollback."
    config:
      environment: "production"
      strategy: "blue-green"
      rollback_on_failure: true

edges:
  - from: "lint"
    to: "unit_tests"
    mode: "parallel"
  - from: "lint"
    to: "integration_tests"
    mode: "parallel"
  - from: "unit_tests"
    to: "build_docker"
    mode: "sequential"
  - from: "integration_tests"
    to: "build_docker"
    mode: "sequential"
  - from: "build_docker"
    to: "deploy_staging"
    mode: "sequential"
  - from: "deploy_staging"
    to: "approval_gate"
    mode: "sequential"
  - from: "approval_gate"
    to: "deploy_production"
    mode: "sequential"