Skip to content

Commit b8045ad

Browse files
[CI] Lock sonar scanner and mint versions and get rid of brew (#739)
1 parent 29091e3 commit b8045ad

File tree

10 files changed

+108
-186
lines changed

10 files changed

+108
-186
lines changed

.github/actions/bootstrap/action.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,6 @@ runs:
1414
path: ~/.mint
1515
key: ${{ env.IMAGE }}-mint-${{ hashFiles('**/Mintfile') }}
1616
restore-keys: ${{ env.IMAGE }}-mint-
17-
- name: Cache brew
18-
uses: actions/cache@v4
19-
id: brew-cache
20-
with:
21-
path: |
22-
~/Library/Caches/Homebrew/mint*
23-
~/Library/Caches/Homebrew/vale*
24-
~/Library/Caches/Homebrew/xcparse*
25-
~/Library/Caches/Homebrew/sonar-scanner*
26-
key: ${{ env.IMAGE }}-brew-${{ hashFiles('**/Brewfile.lock.json') }}
27-
restore-keys: ${{ env.IMAGE }}-brew-
2817
- uses: ./.github/actions/ruby-cache
2918
- uses: ./.github/actions/xcode-cache
3019
- run: ./Scripts/bootstrap.sh

.github/workflows/cron-checks.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ jobs:
7373
INSTALL_ALLURE: true
7474
INSTALL_YEETD: true
7575
SKIP_MINT_BOOTSTRAP: true
76-
SKIP_BREW_BOOTSTRAP: true
7776
- uses: ./.github/actions/setup-ios-runtime
7877
if: ${{ matrix.setup_runtime }}
7978
timeout-minutes: 60
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Smoke Checks SwiftUI
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- main
8+
9+
pull_request:
10+
paths-ignore:
11+
- 'README.md'
12+
- 'CHANGELOG.md'
13+
14+
workflow_dispatch:
15+
inputs:
16+
snapshots:
17+
description: 'Should Snapshots be recorded on CI?'
18+
type: boolean
19+
required: false
20+
default: false
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
26+
env:
27+
HOMEBREW_NO_INSTALL_CLEANUP: 1 # Disable cleanup for homebrew, we don't need it on CI
28+
IOS_SIMULATOR_DEVICE: "iPhone 16 Pro (18.1)"
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
GITHUB_PR_NUM: ${{ github.event.pull_request.number }}
31+
32+
jobs:
33+
test-ui-debug:
34+
name: Test SwiftUI (Debug)
35+
runs-on: macos-15
36+
steps:
37+
- uses: actions/checkout@v4.1.1
38+
- uses: ./.github/actions/bootstrap
39+
env:
40+
INSTALL_YEETD: true
41+
INSTALL_SONAR: true
42+
- uses: ./.github/actions/python-cache
43+
- name: Run UI Tests (Debug)
44+
run: bundle exec fastlane test_ui device:"${{ env.IOS_SIMULATOR_DEVICE }}" record:${{ github.event.inputs.snapshots }}
45+
timeout-minutes: 120
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.CI_BOT_GITHUB_TOKEN }} # to open a PR
48+
- name: Run Sonar analysis
49+
if: ${{ github.event.inputs.snapshots != 'true' }}
50+
run: bundle exec fastlane sonar_upload
51+
env:
52+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
53+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
54+
- uses: 8398a7/action-slack@v3
55+
with:
56+
status: ${{ job.status }}
57+
text: "You shall not pass!"
58+
job_name: "Test (Debug)"
59+
fields: message,commit,author,action,workflow,job,took
60+
env:
61+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
62+
MATRIX_CONTEXT: ${{ toJson(matrix) }}
63+
if: ${{ github.event_name == 'push' && failure() }}
64+
- name: Parse xcresult
65+
if: failure()
66+
run: |
67+
brew install chargepoint/xcparse/xcparse
68+
xcparse logs fastlane/test_output/StreamChatSwiftUI.xcresult fastlane/test_output/logs/
69+
xcparse screenshots fastlane/test_output/StreamChatSwiftUI.xcresult fastlane/test_output/snapshots --test
70+
- uses: actions/upload-artifact@v4
71+
if: failure()
72+
with:
73+
name: Test Data UI
74+
path: |
75+
fastlane/recordings
76+
fastlane/sinatra_log.txt
77+
fastlane/test_output/snapshots
78+
fastlane/test_output/logs/*/Diagnostics/**/*.txt
79+
fastlane/test_output/logs/*/Diagnostics/simctl_diagnostics/DiagnosticReports/*

.github/workflows/smoke-checks.yml

Lines changed: 3 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,11 @@ name: Smoke Checks
22

33
on:
44
pull_request:
5-
branches:
6-
- '**'
5+
paths-ignore:
6+
- 'README.md'
7+
- 'CHANGELOG.md'
78

89
workflow_dispatch:
9-
inputs:
10-
snapshots:
11-
description: 'Should Snapshots be recorded on CI?'
12-
type: boolean
13-
required: false
14-
default: false
1510

1611
concurrency:
1712
group: ${{ github.workflow }}-${{ github.ref }}
@@ -27,7 +22,6 @@ jobs:
2722
build-test-app-and-frameworks:
2823
name: Build Test App and Frameworks
2924
runs-on: macos-15
30-
if: ${{ github.event_name != 'push' }}
3125
steps:
3226
- uses: actions/checkout@v4.1.1
3327
- uses: ./.github/actions/ruby-cache
@@ -49,7 +43,6 @@ jobs:
4943
runs-on: macos-15
5044
env:
5145
XCODE_VERSION: "15.4"
52-
if: ${{ github.event_name != 'push' && github.event.inputs.snapshots != 'true' }}
5346
steps:
5447
- uses: actions/checkout@v4.1.1
5548
- uses: ./.github/actions/bootstrap
@@ -66,7 +59,6 @@ jobs:
6659
build-xcode15:
6760
name: Build SDKs (Xcode 15.0)
6861
runs-on: macos-15
69-
if: ${{ github.event_name != 'push' && github.event.inputs.snapshots != 'true' }}
7062
env:
7163
XCODE_VERSION: "15.4"
7264
steps:
@@ -89,62 +81,9 @@ jobs:
8981
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
9082
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
9183

92-
test-ui-debug:
93-
name: Test SwiftUI (Debug)
94-
runs-on: macos-15
95-
needs: build-test-app-and-frameworks
96-
steps:
97-
- uses: actions/checkout@v4.1.1
98-
- uses: actions/download-artifact@v4
99-
with:
100-
name: cache-derived-data
101-
path: derived_data/Build/
102-
- uses: ./.github/actions/bootstrap
103-
env:
104-
INSTALL_YEETD: true
105-
- uses: ./.github/actions/python-cache
106-
- name: Run UI Tests (Debug)
107-
run: bundle exec fastlane test_ui device:"${{ env.IOS_SIMULATOR_DEVICE }}" skip_build:true record:${{ github.event.inputs.snapshots }}
108-
timeout-minutes: 120
109-
env:
110-
GITHUB_TOKEN: ${{ secrets.CI_BOT_GITHUB_TOKEN }} # to open a PR
111-
- name: Run Sonar analysis
112-
if: ${{ github.event.inputs.snapshots != 'true' }}
113-
run: bundle exec fastlane sonar_upload
114-
env:
115-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
116-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
117-
- uses: 8398a7/action-slack@v3
118-
with:
119-
status: ${{ job.status }}
120-
text: "You shall not pass!"
121-
job_name: "Test (Debug)"
122-
fields: message,commit,author,action,workflow,job,took
123-
env:
124-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
125-
MATRIX_CONTEXT: ${{ toJson(matrix) }}
126-
if: ${{ github.event_name == 'push' && failure() }}
127-
- name: Parse xcresult
128-
if: failure()
129-
run: |
130-
brew install chargepoint/xcparse/xcparse
131-
xcparse logs fastlane/test_output/StreamChatSwiftUI.xcresult fastlane/test_output/logs/
132-
xcparse screenshots fastlane/test_output/StreamChatSwiftUI.xcresult fastlane/test_output/snapshots --test
133-
- uses: actions/upload-artifact@v4
134-
if: failure()
135-
with:
136-
name: Test Data UI
137-
path: |
138-
fastlane/recordings
139-
fastlane/sinatra_log.txt
140-
fastlane/test_output/snapshots
141-
fastlane/test_output/logs/*/Diagnostics/**/*.txt
142-
fastlane/test_output/logs/*/Diagnostics/simctl_diagnostics/DiagnosticReports/*
143-
14484
allure_testops_launch:
14585
name: Launch Allure TestOps
14686
runs-on: macos-13
147-
if: ${{ github.event_name != 'push' && github.event.inputs.snapshots != 'true' }}
14887
needs: build-test-app-and-frameworks
14988
outputs:
15089
launch_id: ${{ steps.get_launch_id.outputs.launch_id }}
@@ -163,7 +102,6 @@ jobs:
163102
test-e2e-debug:
164103
name: Test E2E UI (Debug)
165104
runs-on: macos-15
166-
if: ${{ github.event_name != 'push' && github.event.inputs.snapshots != 'true' }}
167105
needs:
168106
- allure_testops_launch
169107
- build-test-app-and-frameworks
@@ -184,7 +122,6 @@ jobs:
184122
INSTALL_ALLURE: true
185123
INSTALL_YEETD: true
186124
SKIP_MINT_BOOTSTRAP: true
187-
SKIP_BREW_BOOTSTRAP: true
188125
- name: Run UI Tests (Debug)
189126
run: bundle exec fastlane test_e2e_mock device:"${{ env.IOS_SIMULATOR_DEVICE }}" batch:'${{ matrix.batch }}' test_without_building:true
190127
timeout-minutes: 100
@@ -220,7 +157,6 @@ jobs:
220157
name: Build Demo App
221158
runs-on: macos-14
222159
needs: build-test-app-and-frameworks
223-
if: ${{ github.event_name != 'push' && github.event.inputs.snapshots != 'true' }}
224160
steps:
225161
- uses: actions/checkout@v4.1.1
226162
- uses: actions/download-artifact@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ fastlane/screenshots
7171
fastlane/test_output
7272
fastlane/allurectl
7373
fastlane/xcresults
74+
fastlane/sonar
75+
fastlane/mint
7476
**/metrics/
7577
fastlane/recordings
7678
StreamChatCore.framework.coverage.txt

Brewfile

Lines changed: 0 additions & 2 deletions
This file was deleted.

Brewfile.lock.json

Lines changed: 0 additions & 91 deletions
This file was deleted.

Githubfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
export ALLURECTL_VERSION='2.15.1'
44
export XCRESULTS_VERSION='1.16.3'
55
export YEETD_VERSION='1.0'
6+
export MINT_VERSION='0.17.5'
7+
export SONAR_VERSION='6.2.1.4610'

0 commit comments

Comments
 (0)