-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathbitrise.yml
95 lines (88 loc) · 2.65 KB
/
bitrise.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
---
format_version: '11'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: macos
workflows:
primary:
before_run:
- _setup
steps:
- fastlane@3:
inputs:
- update_fastlane: 'false'
- lane: ci
title: Build & Test
- script@1:
title: Export test results
is_always_run: true
inputs:
- content: |-
#!/usr/bin/env bash
set -ex
# Source: https://devcenter.bitrise.io/testing/exporting-to-test-reports-from-custom-script-steps/
JUNIT=./artifacts/unit-tests/report.junit
if [ ! -f "$JUNIT" ]; then
echo "No JUnit file to export"
exit 0
fi
# Creating the sub-directory for the test run within the BITRISE_TEST_RESULT_DIR:
test_run_dir="$BITRISE_TEST_RESULT_DIR/result_dir_1"
mkdir "$test_run_dir"
# Exporting the JUnit XML test report:
cp "$JUNIT" "$test_run_dir/UnitTest.xml"
# Creating the test-info.json file with the name of the test run defined:
echo '{"test-name":"Tests scheme run"}' >> "$test_run_dir/test-info.json"
- deploy-to-bitrise-io@2:
run_if: '{{enveq "BITRISE_GIT_BRANCH" "master"}}'
inputs:
- deploy_path: ./artifacts
- is_compress: 'true'
- deploy-to-bitrise-io@2:
title: 'Export test results only'
run_if: '{{getenv "BITRISE_GIT_BRANCH" | ne "master"}}'
- cache-push@2:
inputs:
- cache_paths: |-
$BITRISE_CACHE_DIR
$GEM_CACHE_PATH
_setup:
steps:
- git-clone@6:
inputs:
- update_submodules: 'no'
- merge_pr: 'no'
- cache-pull@2: {}
- script@1:
title: Bundle install
inputs:
- content: |-
#!/usr/bin/env bash
set -ex
if [ ! -f "Gemfile" ]; then
echo "No Gemfile detected. Skipping..."
exit 0
fi
bundle install
RBENV_DIR="`cd $(rbenv which ruby)/../..;pwd`"
echo "Gem cache directory: $RBENV_DIR"
envman add --key GEM_CACHE_PATH --value $RBENV_DIR
- brew-install@0:
title: Install swiftlint
inputs:
- cache_enabled: 'yes'
- upgrade: 'no'
- packages: swiftlint
- cocoapods-install@1:
inputs:
- verbose: 'false'
app:
envs:
- opts:
is_expand: false
BITRISE_PROJECT_PATH: pusher.xcworkspace
- opts:
is_expand: false
BITRISE_SCHEME: pusher
- opts:
is_expand: false
BITRISE_EXPORT_METHOD: none