-
-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (83 loc) · 2.82 KB
/
test-local.yml
File metadata and controls
104 lines (83 loc) · 2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Test Suite (Local)
# Simplified workflow for local testing with act
# This workflow is designed ONLY for local testing - it will never run in GitHub Actions
# Use: act -W .github/workflows/test-local.yml -j lint
on:
workflow_dispatch: # Manual trigger only (prevents automatic GHA runs)
jobs:
# Linting and code quality (act-compatible, no setup actions)
lint:
name: Lint and Format Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Install Deno
run: |
curl -fsSL https://deno.land/install.sh | sh
echo "$HOME/.deno/bin" >> $GITHUB_PATH
- name: Check Deno formatting
run: $HOME/.deno/bin/deno fmt --check
- name: Run Deno lint
run: $HOME/.deno/bin/deno lint
# Vitest unit tests
vitest-tests:
name: Vitest Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: app/frontend/package-lock.json
- name: Install frontend dependencies
working-directory: ./app/frontend
run: npm ci
- name: Run Vitest with coverage
working-directory: ./app/frontend
run: npm run test:coverage
continue-on-error: true
# Clippy check (Rust linting)
clippy:
name: Rust Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Run Clippy
run: cargo clippy --workspace
# Playwright E2E tests (runs natively on your machine via act's -self-hosted)
playwright:
name: Playwright E2E Tests
runs-on: macOS # Mapped to -self-hosted in .actrc, runs natively
steps:
- name: Checkout code
run: |
# act -self-hosted doesn't auto-clone; symlink source into workspace
if [ ! -d "app" ]; then
PROJECT_DIR="${OLDPWD:-/Users/lance/git/mt}"
if [ -d "$PROJECT_DIR/app" ]; then
ln -sf "$PROJECT_DIR"/* . 2>/dev/null || true
ln -sf "$PROJECT_DIR"/.[!.]* . 2>/dev/null || true
fi
fi
echo "Working directory: $(pwd)"
echo "Node version: $(node --version)"
ls -la app/frontend/ | head -5
- name: Install frontend dependencies
working-directory: ./app/frontend
run: npm ci
- name: Install Playwright browsers
working-directory: ./app/frontend
run: npx playwright install webkit
- name: Run Playwright tests
working-directory: ./app/frontend
run: npx playwright test
env:
CI: true