Skip to content

Commit f6ffdd1

Browse files
committed
[#448] Update triggering on PR for Codemagic
1 parent fa7931b commit f6ffdd1

File tree

1 file changed

+17
-45
lines changed

1 file changed

+17
-45
lines changed

codemagic.yaml

Lines changed: 17 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
definitions:
22
configure_environment: &configure_environment
33
instance_type: mac_mini_m1
4-
max_build_duration: 60
4+
max_build_duration: 30
55
cache:
66
cache_paths:
77
- $HOME/.gradle/caches
@@ -31,7 +31,16 @@ workflows:
3131
<<: *configure_environment
3232
triggering:
3333
events:
34+
# run when a pull request is opened or updated
3435
- pull_request
36+
branch_patterns:
37+
# review changes BEFORE they’re merged into any branches
38+
- pattern: '*'
39+
source: false
40+
# review changes AFTER they have been merged into develop branch
41+
- pattern: 'develop'
42+
# review changes AFTER they have been merged into main branch
43+
- pattern: 'main'
3544
cancel_previous_builds: true
3645
scripts:
3746
- *detekt_on_template_compose
@@ -44,53 +53,16 @@ workflows:
4453
<<: *configure_environment
4554
triggering:
4655
events:
56+
# run when a pull request is opened or updated
4757
- pull_request
48-
cancel_previous_builds: true
49-
scripts:
50-
- *detekt_on_template_xml
51-
- *unit_test_on_template_xml
52-
artifacts:
53-
- *artifacts_template_xml
54-
55-
unit-test-on-push-for-template-compose:
56-
name: Unit test on push for template-compose
57-
<<: *configure_environment
58-
triggering:
59-
events:
60-
- push
61-
branch_patterns:
62-
- pattern: '*'
63-
- pattern: develop
64-
include: false
65-
- pattern: 'release/**'
66-
include: false
67-
- pattern: 'hotfix/**'
68-
include: false
69-
- pattern: master
70-
include: false
71-
cancel_previous_builds: true
72-
scripts:
73-
- *detekt_on_template_compose
74-
- *unit_test_on_template_compose
75-
artifacts:
76-
- *artifacts_template_compose
77-
78-
unit-test-on-push-for-template-xml:
79-
name: Unit test on push for template-xml
80-
<<: *configure_environment
81-
triggering:
82-
events:
83-
- push
8458
branch_patterns:
59+
# review changes BEFORE they’re merged into any branches
8560
- pattern: '*'
86-
- pattern: develop
87-
include: false
88-
- pattern: 'release/**'
89-
include: false
90-
- pattern: 'hotfix/**'
91-
include: false
92-
- pattern: master
93-
include: false
61+
source: false
62+
# review changes AFTER they have been merged into develop branch
63+
- pattern: 'develop'
64+
# review changes AFTER they have been merged into main branch
65+
- pattern: 'main'
9466
cancel_previous_builds: true
9567
scripts:
9668
- *detekt_on_template_xml

0 commit comments

Comments
 (0)