feat(map): 滑行时间估算与机位起点选择 #40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| # 合并门禁:编译通过 + Lint 零警告 + 类型零错误 + 单测通过 + 版本同步。 | |
| # 任一不过不得合并。 | |
| on: | |
| push: | |
| branches: ['**'] | |
| tags-ignore: ['v*'] | |
| pull_request: | |
| workflow_dispatch: | |
| # 同一分支的新推送取消上一次仍在跑的任务,省 runner 时间 | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| quality-gate: | |
| name: 质量门禁 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: npm | |
| # 用 lockfile 精确还原依赖,保证可复现 | |
| - name: 安装依赖 | |
| run: npm ci | |
| - name: 版本号跨文件同步校验 | |
| run: npm run check:version | |
| # 依赖方向铁律:core 不得反向依赖 modules,纯计算 service 不得碰框架 | |
| - name: 架构约束校验 | |
| run: npm run check:arch | |
| # 键集一致 / 无重复键 / 占位符对齐,并报告各语言覆盖率 | |
| - name: i18n 校验 | |
| run: npm run check:i18n | |
| # 警告即错误(--max-warnings=0)。只收能抓真实缺陷的规则,不收风格规则 | |
| - name: ESLint(零警告) | |
| run: npm run lint | |
| - name: 类型检查(零错误) | |
| run: npm run typecheck | |
| # 纯计算部分的单测:进近波束 / 等待航线 / PAPI / 机场轮廓 / 响应解析 / 气象解码 | |
| - name: 单元测试 | |
| run: npm run test | |
| - name: 生产构建 | |
| run: npm run build | |
| # 构建产物留存,方便直接下载验证这次改动 | |
| - name: 上传构建产物 | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: web-dist-${{ github.sha }} | |
| path: dist/ | |
| retention-days: 7 |