Skip to content

Instantly share code, notes, and snippets.

@yawillianpsb
yawillianpsb / .gitlab-ci.yml
Last active February 7, 2023 06:52
Mr pipeline (Tests + code coverage)
variables:
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
MR_LINK: "[MR $CI_MERGE_REQUEST_IID](https://gitlab-01/ios/-/merge_requests/$CI_MERGE_REQUEST_IID)"
PIPELINE_URL: "https://gitlab-01/ios/pipelines/$CI_PIPELINE_ID"
# схемы тестов которые нужно прогонять
UNIT_TEST_SCHEMES: "PSBBaseTests"
@yawillianpsb
yawillianpsb / .gitlab-ci.yml
Last active May 23, 2021 15:12
5 stages, 8 jobs
stages:
- test_stage1
- test_stage2
- test_stage3
- test_stage4
- test_stage5
.base_job:
tags:
- ios_tests
import Foundation
guard let scheme = CommandLine.arguments
.first(where: { $0.starts(with: "scheme_") })?
.dropFirst(7) else {
print("⁉️ empty schemes")
print("exit(1)")
exit(1)
}
let reportUrl = URL(string: "file://"+FileManager.default.currentDirectoryPath+"/tests/\(scheme)_report/coverage_result/report.json")!
import Foundation
guard CommandLine.argc > 0 else { exit(-1) }
let schemes = CommandLine.arguments
.first { $0.starts(with: "schemes_") }?
.dropFirst(8)
.split(separator: ",") ?? []
let junitUrls = schemes
.compactMap { URL(string: "file://"+FileManager.default.currentDirectoryPath+"/tests/\($0)_report/report.junit") }
var allTests = 0