Files
Recordly/.github/workflows/quality.yml
webadderall eaf87be95b Recordly 2.0 local review stack 2/6
Dependency-ordered review preparation. Not pushed or remotely reviewed.
2026-11-06 05:24:21 +11:00

115 lines
3.5 KiB
YAML

name: Code Quality
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
quality:
name: Repository quality
runs-on: ubuntu-latest
timeout-minutes: 20
env:
CI: true
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '22'
cache: npm
cache-dependency-path: package-lock.json
- name: Install dependencies
id: install
run: npm ci --ignore-scripts
- name: Typecheck
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
run: npx tsc --noEmit
- name: Lint
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
run: npm run lint
- name: Check formatting (advisory)
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
continue-on-error: true
run: npm run format:check
# Real recording-import tests require the binary skipped by --ignore-scripts.
- name: Install FFmpeg for integration tests
id: ffmpeg
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
run: node scripts/install-ffmpeg-static.mjs
- name: Test
if: ${{ !cancelled() && steps.install.outcome == 'success' && steps.ffmpeg.outcome == 'success' }}
run: npm test
# Main currently has known locale-parity debt covered by PR #710. Keep the
# check visible without blocking unrelated PRs; make it required once that
# existing translation PR (or an equivalent fix) lands.
- name: Check translations (advisory)
if: ${{ !cancelled() && steps.install.outcome == 'success' }}
continue-on-error: true
run: npm run i18n:check
cloud-sharing:
name: Self-hosted sharing
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
working-directory: services/recordly-share/worker
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '22'
cache: npm
cache-dependency-path: |
services/recordly-share/worker/package-lock.json
services/recordly-share/worker/web/package-lock.json
- name: Install Worker test dependencies
run: npm ci
- name: Install sharing viewer dependencies
run: npm --prefix web ci
- name: Test sharing viewer
run: npm --prefix web test
- name: Check sharing viewer types and templates
run: npm --prefix web run check
# This validates the source without publishing or claiming legal approval.
# Wrangler deployment separately runs the guarded build:release command.
- name: Build sharing viewer for validation
run: npm --prefix web run build
# Worker asset-route tests use the just-built distribution too.
- name: Test self-hosted Worker, D1 and R2
run: npm test