Files
OSGKeyboard/.github/workflows/ci.yml
T
Rocky 31f5937a7f feat(keyboard): improve typing, voice flow, and polish reliability
Reduce extension memory pressure and delivery races while adding richer candidates, tactile feedback, and safer two-level creative polishing.
2026-08-05 21:39:31 +08:00

95 lines
3.1 KiB
YAML

name: CI
on:
push:
branches: [0.1, 0.2, develop]
pull_request:
branches: [0.1, 0.2, develop]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# =========================================================
# SwiftLint (light config — fails only on severe issues)
# =========================================================
lint:
name: SwiftLint
# macos-14 runner ships Xcode 16.x (default 16.4 in 2026). We pin to
# 16.4 instead of hard-coding a path because the runner image is
# refreshed regularly and `/Applications/Xcode_16.0.app` is no
# longer pre-installed — that's the bug this PR fixes.
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Select Xcode 16.4
run: sudo xcode-select -s /Applications/Xcode_16.4.app
- name: Install SwiftLint
run: brew install swiftlint
- name: Run SwiftLint
# Run twice: --quiet to fail on errors only, --strict to fail
# on warnings too. The current .swiftlint.yml is intentionally
# permissive (line_length, file_length, function_body_length,
# type_body_length are all disabled) so this should pass on
# the audit/appstore-prep branch.
run: |
swiftlint lint --quiet
swiftlint lint --quiet --strict
# =========================================================
# Build the main app + keyboard extension
# =========================================================
build:
name: Build (${{ matrix.destination }})
needs: lint
runs-on: macos-14
strategy:
fail-fast: false
matrix:
destination:
- generic/platform=iOS Simulator
steps:
- uses: actions/checkout@v4
- name: Select Xcode 16.4
run: sudo xcode-select -s /Applications/Xcode_16.4.app
- name: Install XcodeGen
run: brew install xcodegen
- name: Generate project
run: ./Scripts/generate-xcodeproj.sh
- name: Build
run: |
set -o pipefail
xcodebuild \
-project OSGKeyboard.xcodeproj \
-scheme OSGKeyboard \
-destination "${{ matrix.destination }}" \
-configuration Debug \
build \
| xcpretty
# =========================================================
# Unit tests
# =========================================================
test:
name: Unit tests
needs: lint
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Select Xcode 16.4
run: sudo xcode-select -s /Applications/Xcode_16.4.app
- name: Install XcodeGen
run: brew install xcodegen
- name: Generate project
run: ./Scripts/generate-xcodeproj.sh
- name: Validate test suite manifest
run: ./Scripts/run-tests.sh validate
- name: Run tests (pr preset)
# pr = critical-path groups including OSGKeyboardExtTests.
# See Tests/suite-manifest.json and docs/TESTING.md.
run: |
set -o pipefail
SKIP_GENERATE=1 ./Scripts/run-tests.sh pr