-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
28 lines (26 loc) · 1021 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
build_package:
stage: build
script:
- swift build --configuration release
run_unit_tests:
stage: test
script:
# Build tests via spm so xchtmlreport is fetched, built and it is usable in later steps
- swift build --build-tests
# Remove possible garbage
- XCODE_TEST_RESULTS=xcodeTestResults.xcresult
- rm -rf $XCODE_TEST_RESULTS
# Test using xcode to generate xcresult file so it is convertible to junit and html report, also becase code coverage is easier to get
- swift package generate-xcodeproj
- xcodebuild -project ./StringTagProcessor.xcodeproj -scheme StringTagProcessor-Package test -resultBundlePath $XCODE_TEST_RESULTS -enableCodeCoverage YES -quiet
- .build/debug/xchtmlreport -i -r $XCODE_TEST_RESULTS -j
- mv ${XCODE_TEST_RESULTS}/report.junit report.junit
- find ${CI_PROJECT_DIR} -name index.html
- find ${CI_PROJECT_DIR} -name report.junit
artifacts:
paths:
- index.html
reports:
junit: report.junit
tags:
- ios