【发布时间】:2022-10-23 18:00:08
【问题描述】:
我正在尝试实现danger-swift,但我不知道在哪里可以访问测试结果并从Bitrise 标记失败的结果。
我正在使用一个名为 DangerXCodeSummary 的危险 swift 插件,但我不知道 Bitrise 在哪里存储来自 xcode-test@2 的测试结果。
危险文件:
import Danger
import DangerXCodeSummary
import Foundation
let danger = Danger()
let testReportPath = "??" // What's the path for the test results?
XCodeSummary(filePath: testReportPath).report()
比特升脚本:
...
UnitTests:
before_run:
- _ensure_dependencies
after_run:
- _add_build_result_to_pr
steps:
- xcode-test@2: {} # What's the file path for the test results?
- deploy-to-bitrise-io@1: {}
envs:
- ots:
is_expand: false
BITRISE_PROJECT_PATH: MyApp.xcodeproj
- opts:
is_expand: false
BITRISE_SCHEME: AppTests
description: Unit Tests running at every commit.
...
_add_build_result_to_pr:
steps:
- script@1:
title: Commenting on the PR
is_always_run: true
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
echo "################### DANGER ######################"
echo "Install Danger"
brew install danger/tap/danger-swift
echo "Run danger"
danger-swift ci
echo "#################################################"
【问题讨论】:
标签: swift xcode continuous-integration bitrise danger