Skip to content

Refactor floorplan editor UI and data handling #26

Refactor floorplan editor UI and data handling

Refactor floorplan editor UI and data handling #26

Workflow file for this run

name: CI
on:
push:
branches: ["**"]
pull_request:
permissions:
contents: read
deployments: write
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Typecheck
run: npm run typecheck
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Unit Tests
run: npm run test -- --run
browser-smoke:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Browser Smoke Test
run: npm run test:browser
e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Install Playwright Browser
run: npx playwright install --with-deps chromium
- name: Playwright E2E
run: npm run test:e2e
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Upload production bundle
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: production-bundle-${{ github.sha }}
path: dist
if-no-files-found: error
retention-days: 1
deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs:
- typecheck
- lint
- unit-tests
- browser-smoke
- e2e
- build
runs-on: ubuntu-latest
timeout-minutes: 10
concurrency:
group: formation-map-editor-production
cancel-in-progress: false
steps:
- name: Download verified production bundle
uses: actions/download-artifact@v4
with:
name: production-bundle-${{ github.sha }}
path: dist
- name: Deploy exact commit to Cloudflare Pages
uses: cloudflare/wrangler-action@v4
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
wranglerVersion: "4"
command: pages deploy dist --project-name=formation-map-editor --branch=main --commit-hash=${{ github.sha }} --commit-dirty=false