Skip to content

Add end-to-end execution ready plan for Dokploy v3 #114

Add end-to-end execution ready plan for Dokploy v3

Add end-to-end execution ready plan for Dokploy v3 #114

Workflow file for this run

# CI -- the thing that catches what you missed locally.
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || fromJSON('["self-hosted", "linux", "x64", "vps"]') }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- run: npm ci
- name: Lint
run: npm run lint
typecheck:
name: Typecheck
runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || fromJSON('["self-hosted", "linux", "x64", "vps"]') }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- run: npm ci
- name: Typecheck
run: npm run typecheck
test:
name: Test
runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || fromJSON('["self-hosted", "linux", "x64", "vps"]') }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- run: npm ci
- name: Test with coverage
run: npm run test:coverage
- name: Report coverage
if: always()
run: |
echo "## Test Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ -f "coverage/coverage-summary.json" ]; then
node -e "
const c = require('./coverage/coverage-summary.json').total;
const fmt = (m) => m.pct + '%';
console.log('| Metric | Coverage |');
console.log('| --- | --- |');
console.log('| Statements | ' + fmt(c.statements) + ' |');
console.log('| Branches | ' + fmt(c.branches) + ' |');
console.log('| Functions | ' + fmt(c.functions) + ' |');
console.log('| Lines | ' + fmt(c.lines) + ' |');
" >> $GITHUB_STEP_SUMMARY
fi
build:
name: Build
runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || fromJSON('["self-hosted", "linux", "x64", "vps"]') }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- run: npm ci
- name: Build
run: npm run build
- name: Verify artifacts exist
run: |
echo "## Build Artifacts" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| File | Size |" >> $GITHUB_STEP_SUMMARY
echo "| --- | --- |" >> $GITHUB_STEP_SUMMARY
if [ ! -f "dist/index.js" ]; then
echo "::error::Missing artifact: dist/index.js -- something went very wrong"
exit 1
fi
size=$(du -h "dist/index.js" | cut -f1)
echo "| \`dist/index.js\` | $size |" >> $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@v6
with:
name: dist
path: dist/
retention-days: 1
smoke-test:
name: Smoke Test
runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || fromJSON('["self-hosted", "linux", "x64", "vps"]') }}
needs: [build, test]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- run: npm ci
- uses: actions/download-artifact@v6
with:
name: dist
path: dist/
- name: Budget checks
run: npm run ci:budgets
- name: MCP smoke test
run: npm run smoke:mcp
- name: Smoke test --version
run: node dist/index.js --version
- name: Smoke test --help
run: node dist/index.js --help