Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
41 changes: 35 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,48 @@ on:
branches: [ main ]

jobs:
test:
unit-test:
name: Unit Tests (Docker)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
- name: Run Unit Tests
run: ./test/run-docker.sh

e2e-test:
name: E2E Tests (Playwright)
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.57.0-jammy
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'


- name: Install Git
run: apt-get update && apt-get install -y git
Comment thread
flyingrobots marked this conversation as resolved.
Outdated

- name: Configure Git User
run: |
git config --global user.email "ci@git-cms.local"
git config --global user.name "CI Bot"
git config --global init.defaultBranch main

- name: Install Dependencies
run: npm ci

- name: Run Tests (Docker)
run: npm test
- name: Run Playwright Tests
run: npm run test:e2e
env:
CI: true
Comment thread
flyingrobots marked this conversation as resolved.
Outdated

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# git-cms

<img src="./docs/images/hero.png" width="600" alt="Burnt-Out Linux Penguin" align="right" />

A serverless, database-free CMS built on Git plumbing.

> "I'm using `git push` as my API endpoint."
Expand Down
Binary file added docs/images/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { parseArticleCommit } from '../lib/parse.js';
import { chunkFileToRef } from '../lib/chunks.js';

const __dirname = path.dirname(new URL(import.meta.url).pathname);
const PORT = process.env.PORT || 4637;
const PORT = process.env.PORT || 4638;
Comment thread
flyingrobots marked this conversation as resolved.
const CWD = process.env.GIT_CMS_REPO || process.cwd();
const ENV = (process.env.GIT_CMS_ENV || 'dev').toLowerCase();
const REF_PREFIX = process.env.CMS_REF_PREFIX || `refs/_blog/${ENV}`;
Expand Down
7 changes: 7 additions & 0 deletions vitest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
exclude: ['test/e2e/**'],
},
});
Comment thread
flyingrobots marked this conversation as resolved.