-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
33 lines (29 loc) · 1.51 KB
/
.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
29
30
31
32
33
stages:
- build
- lint
before_script:
- bundle install
build_project:
stage: build
script:
- carthage update --platform iOS
- bundle exec fastlane tests
- bundle exec fastlane cov
- 'CI_MERGE_REQUEST_IID=$(curl --request GET --header "Private-Token: $GITLAB_PERSONAL_API_PRIVATE_TOKEN" "https://gitlab.veladan.org/api/v4/projects/$CI_PROJECT_ID/repository/commits/$CI_COMMIT_SHA/merge_requests" --insecure | jq --raw-output ".[0].iid")'
- 'cat xcov_output/report.md > xreport.md'
- '[ -n CI_MERGE_REQUEST_IID ] && curl --request POST --header "Private-Token: $GITLAB_PERSONAL_API_PRIVATE_TOKEN" --data-urlencode body@xreport.md https://gitlab.veladan.org/api/v4/projects/$CI_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/notes --insecure'
tags:
- xcode
lint_project:
stage: lint
script:
- bundle exec fastlane lint
- 'CI_MERGE_REQUEST_IID=$(curl --request GET --header "Private-Token: $GITLAB_PERSONAL_API_PRIVATE_TOKEN" "https://gitlab.veladan.org/api/v4/projects/$CI_PROJECT_ID/repository/commits/$CI_COMMIT_SHA/merge_requests" --insecure | jq --raw-output ".[0].iid")'
- 'echo "body=" > report.html'
- 'cat swiftlint.result >> report.html'
- '[ -n CI_MERGE_REQUEST_IID ] && curl --request POST --header "Private-Token: $GITLAB_PERSONAL_API_PRIVATE_TOKEN" -d @report.html https://gitlab.veladan.org/api/v4/projects/$CI_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/notes --insecure'
tags:
- xcode
variables:
GIT_SSL_NO_VERIFY: "1"
GIT_SUBMODULE_STRATEGY: recursive