Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
47 changes: 41 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,54 @@ 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
# We don't need setup-node here because 'npm test' runs via Docker
# But we need npm to run the script itself?
# Actually 'npm test' is a shell command.
# Wait, the runner has npm.

Comment thread
flyingrobots marked this conversation as resolved.
Outdated
- 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
PORT: 4638
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
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.

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/**', 'node_modules/**'],
},
});
Comment thread
flyingrobots marked this conversation as resolved.
Outdated
Comment thread
flyingrobots marked this conversation as resolved.