跨平台测试矩阵Skill cross-platform-test-matrix

这是一个用于自动化生成跨平台持续集成/持续部署(CI/CD)测试配置的技能。它主要功能是创建针对Windows、macOS和Linux操作系统的测试矩阵,支持多种架构(如x64、arm64),并能与GitHub Actions、Azure DevOps等主流CI/CD平台集成。关键词包括:跨平台测试、CI/CD配置、测试矩阵、GitHub Actions、Azure Pipelines、并行测试、桌面应用测试。

测试 0 次安装 0 次浏览 更新于 2/23/2026

名称: 跨平台测试矩阵 描述: 为 Windows、macOS 和 Linux 组合生成 CI 测试矩阵 允许使用的工具: Read, Write, Edit, Bash, Glob, Grep 标签: [测试, ci-cd, 跨平台, 矩阵, github-actions]

跨平台测试矩阵

为在 Windows、macOS 和 Linux 上测试桌面应用程序生成 CI/CD 测试矩阵配置。

能力

  • 生成 GitHub Actions 矩阵
  • 配置 Azure Pipelines 矩阵
  • 设置平台特定测试
  • 处理架构变体 (x64, arm64)
  • 配置并行执行
  • 设置工件收集

输入模式

{
  "type": "object",
  "properties": {
    "projectPath": { "type": "string" },
    "ciPlatform": { "enum": ["github-actions", "azure-devops", "gitlab-ci"] },
    "platforms": { "type": "array" },
    "architectures": { "type": "array" }
  },
  "required": ["projectPath"]
}

GitHub Actions 矩阵

name: 测试矩阵

on: [push, pull_request]

jobs:
  测试:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        arch: [x64]
        include:
          - os: macos-latest
            arch: arm64

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v4

      - name: 设置 Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          architecture: ${{ matrix.arch }}

      - name: 安装依赖
        run: npm ci

      - name: 运行测试
        run: npm test

      - name: 上传测试结果
        uses: actions/upload-artifact@v4
        if: always()
        with:
          name: 测试结果-${{ matrix.os }}-${{ matrix.arch }}
          path: test-results/

相关技能

  • playwright-electron-config
  • desktop-ci-architect 代理