Files
sky_phone/.github/workflows/ci.yml
T
2026-08-19 14:20:46 +02:00

95 lines
2.1 KiB
YAML

name: CI
on:
pull_request:
push:
branches:
- dev
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
repository-policy:
name: Repository policy
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 22
- name: Validate repository contracts
run: node .github/scripts/validate-repository.mjs
- name: Install Lua compiler
run: |
sudo apt-get update
sudo apt-get install --yes lua5.4
- name: Check Lua syntax
shell: bash
run: |
set -euo pipefail
while IFS= read -r -d '' file; do
luac5.4 -p "$file"
done < <(find sky_phone tests -type f -name '*.lua' -print0)
frontend:
name: Frontend
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
working-directory: frontend
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up pnpm
uses: pnpm/action-setup@v6
with:
version: 10.33.0
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 22
cache: pnpm
cache-dependency-path: frontend/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check repository formatting and schemas
run: >-
pnpm exec prettier --check
"../.github/**/*.{yml,yaml,json,md}"
"../.github/scripts/*.mjs"
"../CONTRIBUTING.md"
"../SECURITY.md"
- name: Lint frontend
run: pnpm lint
- name: Typecheck frontend
run: pnpm typecheck
- name: Test frontend
run: pnpm test
- name: Build deployable NUI
run: pnpm build-only
- name: Verify published NUI entrypoint
run: test -f ../sky_phone/source/html/index.html