Files
toor a1fff482bf make the test suite and openapi generator platform-independent
Windows checkouts turned LF into CRLF (core.autocrlf=true), and several
tests plus the openapi generator hardcoded LF or POSIX path separators.
The result was a suite that was green on Linux CI but red on Windows, and
an openapi.json whose /api/hermes/* routes silently disappeared when
generated on Windows.

Pin the repository to LF via .gitattributes, strip shebangs before
Vite's SSR transform, and key route files by their posix path. Add a
manually triggered macOS verification workflow so the same checks run
on a self-hosted macOS runner.
2026-10-20 11:17:34 +08:00

65 lines
1.8 KiB
YAML

name: macOS Verification
# macOS is not covered by the Build or Playwright workflows: those run on
# `ubuntu-latest`, and this repository's CI is Gitea Actions, which has no
# hosted macOS runner. A `macos-latest` job added to the main Build workflow
# would sit in the runner queue forever and hold the whole workflow in
# "in progress", so macOS verification lives here instead and is triggered
# explicitly.
#
# To run it, register a macOS runner with the `macos-latest` label in the
# Gitea instance, then trigger this workflow from the Actions tab.
on:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: macos-verification-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
# A self-hosted macOS runner. `macos-latest` is the label to register it
# under; Gitea does not provide this runner itself.
runs-on: macos-latest
timeout-minutes: 45
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: package-lock.json
# macOS ships a prebuilt node-pty, so no compiler is needed here. The
# rebuild is still run because it is what the Build workflow does, and
# because it keeps the two workflows comparing the same tree.
- name: Install dependencies
run: |
npm ci --ignore-scripts
npm rebuild node-pty
- name: Check repository harness
run: npm run harness:check
- name: Test with coverage
run: npm run test:coverage
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: End-to-end tests
run: npm run test:e2e
- name: Build
run: npm run build