-
Notifications
You must be signed in to change notification settings - Fork 15
102 lines (97 loc) · 3.48 KB
/
test_pr_changes.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
96
97
98
99
100
101
102
name: Test Pull Request Changes
on:
pull_request:
types: [opened, synchronize, edited, ready_for_review]
merge_group:
types: [checks_requested]
# This is what will cancel the workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# This job will tell us which frameworks have source code changes.
# We'll use the results to run tests only for changed frameworks.
detect-changes:
name: Detect PR Changes
if: >
github.event.action != 'edited' || (
github.event.changes.title == null &&
github.event.changes.body == null &&
github.event.changes.assignees == null &&
github.event.changes.reviewers == null &&
github.event.changes.labels == null
) && github.event.pull_request.draft == false
runs-on: ubuntu-latest
# Set job outputs to values from filter step
outputs:
folders: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v4
with:
lfs: 'false' # as long as we use lfs only for snapshotTesting it should not be useful here
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
fastlane:
- 'fastlane/**'
wire-ios:
- 'wire-ios/**'
WireUI:
- 'WireUI/**'
- 'wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireUIAll.xcscheme'
wire-ios-share-engine:
- 'wire-ios-share-engine/**'
wire-ios-notification-engine:
- 'wire-ios-notification-engine/**'
wire-ios-sync-engine:
- 'wire-ios-sync-engine/**'
wire-ios-request-strategy:
- 'wire-ios-request-strategy/**'
WireAPI:
- 'WireAPI/**'
- 'wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireAPIAll.xcscheme'
WireAnalytics:
- 'WireAnalytics/**'
- 'wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireAnalyticsAll.xcscheme'
WireDomain:
- 'WireDomain/**'
WireLogging:
- 'WireLogging/**'
- 'wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireLoggingAll.xcscheme'
wire-ios-data-model:
- 'wire-ios-data-model/**'
wire-ios-transport:
- 'wire-ios-transport/**'
wire-ios-cryptobox:
- 'wire-ios-cryptobox/**'
wire-ios-mocktransport:
- 'wire-ios-mocktransport/**'
wire-ios-protos:
- 'wire-ios-protos/**'
wire-ios-images:
- 'wire-ios-images/**'
wire-ios-link-preview:
- 'wire-ios-link-preview/**'
wire-ios-utilities:
- 'wire-ios-utilities/**'
wire-ios-testing:
- 'wire-ios-testing/**'
WireFoundation:
- 'WireFoundation/**'
- 'wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireFoundationAll.xcscheme'
wire-ios-system:
- 'wire-ios-system/**'
scripts:
- 'scripts/**'
carthage:
- 'Cartfile.resolved'
trigger_tests_pr:
needs: detect-changes
name: PR Tests
uses: ./.github/workflows/_reusable_run_tests.yml
with:
folders: ${{ join(fromJson(needs.detect-changes.outputs.folders), ',') }}
branch: ${{ github.head_ref }}
notify_secret: WIRE_IOS_CI_WEBHOOK
secrets: inherit