Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
211 changes: 211 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
setup:
name: Setup and Install Dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.12.1

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Cache node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-deps-${{ hashFiles('**/pnpm-lock.yaml') }}

build:
name: Build Project
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.12.1

- name: Restore node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-deps-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Build project
run: pnpm build

- name: Cache build artifacts
uses: actions/cache@v4
with:
path: |
.next/cache
.next/static
.next/standalone
dist
key: ${{ runner.os }}-build-${{ github.sha }}

test:
name: Run Tests
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.12.1

- name: Restore node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-deps-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Restore build cache
uses: actions/cache@v4
with:
path: |
.next/cache
.next/static
.next/standalone
dist
key: ${{ runner.os }}-build-${{ github.sha }}

- name: Run tests
run: pnpm test --coverage

- name: Upload coverage reports
if: matrix.node-version == 20
uses: codecov/codecov-action@v4
with:
file: ./coverage/lcov.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false

lint:
name: Run Linting
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.12.1

- name: Restore node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-deps-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Run lint
run: pnpm lint

format:
name: Check Formatting
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.12.1

- name: Restore node_modules cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-deps-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Check formatting
run: pnpm format:check

# Summary job that depends on all others
ci-success:
name: CI Success
runs-on: ubuntu-latest
needs: [setup, build, test, lint, format]
if: always()

steps:
- name: Check all jobs
run: |
if [[ "${{ needs.setup.result }}" == "success" && \
"${{ needs.build.result }}" == "success" && \
"${{ needs.test.result }}" == "success" && \
"${{ needs.lint.result }}" == "success" && \
"${{ needs.format.result }}" == "success" ]]; then
echo "✅ All CI jobs passed!"
exit 0
else
echo "❌ Some CI jobs failed:"
echo " Setup: ${{ needs.setup.result }}"
echo " Build: ${{ needs.build.result }}"
echo " Test: ${{ needs.test.result }}"
echo " Lint: ${{ needs.lint.result }}"
echo " Format: ${{ needs.format.result }}"
exit 1
fi
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Markdown Workflow

[![CI](https://github.com/nickhart/markdown-workflow/workflows/CI/badge.svg)](https://github.com/nickhart/markdown-workflow/actions/workflows/ci.yml)
[![Tests](https://img.shields.io/badge/Tests-109%20passing-brightgreen)](https://github.com/nickhart/markdown-workflow/actions/workflows/ci.yml)
[![Node.js](https://img.shields.io/badge/Node.js-20+-brightgreen)](https://nodejs.org/)
[![pnpm](https://img.shields.io/badge/pnpm-10+-blue)](https://pnpm.io/)
[![TypeScript](https://img.shields.io/badge/TypeScript-5+-blue)](https://www.typescriptlang.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A generalized markdown-based workflow system built with Node.js and TypeScript. It provides a template-driven workflow engine for creating documents, managing content, and tracking collections through different stages.

## Features
Expand Down Expand Up @@ -126,13 +133,25 @@ wf --help # Show available commands
wf create --help # Show create command options
```

### Coming Soon (WorkflowEngine implemented, CLI integration pending)
### Workflow Management

```bash
wf list [workflow] [status] # List collections
wf status <workflow> <id> <status> # Update collection status
wf format <workflow> <id> # Format documents to DOCX/HTML/PDF
wf notes <workflow> <id> <type> # Create interview notes
# List collections
wf list job # List all job collections
wf list job active # List active job collections only
wf list job --format json # Output as JSON

# Update collection status
wf status job company_role_20240101 submitted # Update status
wf status job company_role_20240101 interview # Move to interview stage

# Format documents
wf format job company_role_20240101 # Format to DOCX (default)
wf format job company_role_20240101 --format pdf # Format to PDF

# Create interview notes
wf notes job company_role_20240101 recruiter # Create recruiter notes
wf notes job company_role_20240101 technical --interviewer "John Doe"
```

## Development
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"version": "0.1.0",
"private": true,
"type": "module",
"packageManager": "pnpm@10.12.1",
"engines": {
"node": ">=20",
"pnpm": ">=10"
},
"bin": {
"wf": "dist/cli/index.js"
},
Expand Down