Skip to content

feat: extract handicap score calculation logic into a new module and add unit tests #1

feat: extract handicap score calculation logic into a new module and add unit tests

feat: extract handicap score calculation logic into a new module and add unit tests #1

Workflow file for this run

name: CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
frontend:
name: Frontend CI
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
- name: Sync SvelteKit
run: npx svelte-kit sync
- name: Check Types
run: npm run check
- name: Lint
run: npm run lint
- name: Unit Tests
run: npm run test:unit
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: E2E Tests
run: npm run test:e2e
- name: Build
run: npm run build
worker:
name: Worker CI
runs-on: ubuntu-latest
defaults:
run:
working-directory: worker
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: worker/package-lock.json
- name: Install dependencies
run: npm ci
# Worker usually implies TypeScript in this context, but without a test script or tsconfig,
# we can at least verify dependencies install correctly.
# If there was a 'test' script, we would run it here.
# We can try to run a dry-run publish if wrangler supports it without auth, but usually it requires auth.
- name: Type Check (if tsconfig exists)
run: |
if [ -f tsconfig.json ]; then
npx tsc --noEmit
else
echo "No tsconfig.json found, skipping type check."
fi