Enhance STMarkdown functionality with CocoaPods integration and tests #25
Workflow file for this run
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
| # 库仓 CI:静态检查 + SPM 构建烟囱测试。 | |
| # Example 全量单测 / UI 测在同仓 `.github/workflows/example-tests.yml`(根目录 `STBaseProject.xcworkspace`)。 | |
| name: Swift | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: macos-15 | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # 默认 xcode-select 常为旧版;脚本按 Info.plist 版本号选 /Applications 下最高的 Xcode(见 .github/select_xcode_ci.sh)。 | |
| - name: Select Xcode | |
| run: bash "${GITHUB_WORKSPACE}/.github/select_xcode_ci.sh" | |
| - name: Check try? policy | |
| run: bash .github/check_try_question_mark.sh | |
| - name: SwiftLint | |
| run: | | |
| if ! command -v swiftlint >/dev/null 2>&1; then | |
| brew install swiftlint | |
| fi | |
| swiftlint version | |
| # 不加 --strict:warning 不阻断 CI,仅 .swiftlint.yml 中明确为 error 级别的规则会失败构建。 | |
| # 待存量 warning 清零后可改为 --strict 提升门槛。 | |
| swiftlint --reporter github-actions-logging | |
| - name: Resolve SPM dependencies | |
| run: xcodebuild -resolvePackageDependencies -scheme STBaseProject-Package | |
| - name: Build (iOS Simulator) | |
| run: | | |
| xcodebuild \ | |
| -scheme STBaseProject-Package \ | |
| -destination 'generic/platform=iOS Simulator' \ | |
| build | |