-
Notifications
You must be signed in to change notification settings - Fork 9
128 lines (126 loc) · 4.63 KB
/
action_pull_request.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Combined Pull Request
on: [workflow_dispatch, pull_request]
jobs:
build:
runs-on: macos-14
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0.1'
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch develop branch so screenshotbot can access it
run: |
git fetch origin develop
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
common-fastlane: &common-fastlane
- fastlane/Appfile
- Gemfile
- Gemfile.lock
common-kotlin: &common-kotlin
- *common-fastlane
- build-logic/**
- settings.gradle.kts
- gradle.properties
- build.gradle.kts
- mockzilla-common/**
- gradle/**
flutter:
- *common-fastlane
- FlutterMockzilla/**
- fastlane/fastfiles/flutter.rb
docs:
- *common-fastlane
- docs/**
- fastlane/fastfiles/docs.rb
mockzilla-server: &mockzilla-server
- *common-kotlin
- mockzilla/**
- fastlane/fastfiles/lib_pull_request.rb
mockzilla-management: &mockzilla-management
- *mockzilla-server
- mockzilla-management/**
- fastlane/fastfiles/lib.rb
mockzilla-management-ui:
- *mockzilla-management
- fastlane/fastfiles/management-ui.rb
- mockzilla-management-ui/**
swift-mockzilla:
- *mockzilla-server
- SwiftMockzilla/**
sample-ios:
- samples/demo-ios/**
sample-android:
- *mockzilla-server
- samples/demo-android/**
sample-kmm:
- *mockzilla-server
- samples/demo-kmm/**
swagger:
- webapi.yml
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- uses: actions/setup-python@v5
if: steps.filter.outputs.docs == 'true'
with:
python-version: 3.x
- name: Setup fastlane
run: bundle install
- name: Docs
if: steps.filter.outputs.docs == 'true'
run: |
pip install --upgrade setuptools
pip install -r docs/requirements.txt
bundle exec fastlane generate_docs
- uses: subosito/flutter-action@v2
if: steps.filter.outputs.flutter == 'true'
with:
flutter-version: '3.19.2'
channel: 'stable'
- name: Flutter
if: steps.filter.outputs.flutter == 'true'
run: |
bundle exec fastlane flutter_lib_pull_request
bundle exec fastlane demo_flutter_pull_request
- name: Mockzilla Server (core)
if: steps.filter.outputs.mockzilla-server == 'true'
run: |
bundle exec fastlane android lib_mockzilla_pull_request
bundle exec fastlane ios lib_mockzilla_pull_request
bundle exec fastlane publish_to_maven_local
- name: Management Library
if: steps.filter.outputs.mockzilla-management == 'true'
run: bundle exec fastlane lib_mockzilla_management_pull_request
- name: Management UI (desktop app)
if: steps.filter.outputs.mockzilla-management-ui == 'true'
run: bundle exec fastlane android management_ui_pull_request
- name: SwiftMockzilla
if: steps.filter.outputs.swift-mockzilla == 'true'
run: bundle exec fastlane ios lib_swift_mockzilla_pull_request
- name: Samples - Android
if: steps.filter.outputs.sample-android == 'true'
run: bundle exec fastlane android demo_android_pull_request
- name: Samples - iOS
if: steps.filter.outputs.sample-ios == 'true'
run: bundle exec fastlane ios demo_ios_pull_request
- name: Samples - KMM
if: steps.filter.outputs.sample-kmm == 'true'
run: |
bundle exec fastlane android demo_kmm_pull_request
bundle exec fastlane ios demo_kmm_pull_request
- name: Validate Swagger and OpenAPI using Swagger CLI
if: steps.filter.outputs.swagger == 'true'
uses: mbowman100/swagger-validator-action@2.0
with:
files: webapi.yaml
env:
PR: true
GIT_REPOSITORY_URL: ${{ github.repositoryUrl }}
SCREENSHOTBOT_API_KEY: ${{ secrets.SCREENSHOTBOT_API_KEY }}
SCREENSHOTBOT_API_SECRET: ${{ secrets.SCREENSHOTBOT_API_SECRET }}