|
| 1 | +name: Smoke Checks |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + release: |
| 11 | + types: |
| 12 | + - created |
| 13 | + |
| 14 | +concurrency: |
| 15 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 16 | + cancel-in-progress: true |
| 17 | + |
| 18 | +env: |
| 19 | + HOMEBREW_NO_INSTALL_CLEANUP=1: 1 # Disable cleanup for homebrew, we don't need it on CI |
| 20 | + |
| 21 | +jobs: |
| 22 | + automated-code-review: |
| 23 | + name: Automated Code Review |
| 24 | + runs-on: macos-11 |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v1 |
| 27 | + - uses: ./.github/actions/set-build-image-var |
| 28 | + - name: Cache RubyGems |
| 29 | + uses: actions/cache@v2 |
| 30 | + id: rubygem-cache |
| 31 | + with: |
| 32 | + path: vendor/bundle |
| 33 | + key: ${{ runner.os }}-${{ env.ImageVersion }}-gem-${{ hashFiles('**/Gemfile.lock') }} |
| 34 | + restore-keys: ${{ runner.os }}-${{ env.ImageVersion }}-gem- |
| 35 | + - name: Cache Mint |
| 36 | + uses: actions/cache@v2 |
| 37 | + id: mint-cache |
| 38 | + with: |
| 39 | + path: /usr/local/lib/mint |
| 40 | + key: ${{ runner.os }}-mint-${{ hashFiles('./Mintfile') }} |
| 41 | + restore-keys: ${{ runner.os }}-mint- |
| 42 | + - uses: ./.github/actions/bootstrap |
| 43 | + - name: Run Danger |
| 44 | + run: bundle exec danger |
| 45 | + env: |
| 46 | + GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} |
| 47 | + - name: Run Linting |
| 48 | + run: ./Scripts/run-linter.sh |
| 49 | + |
| 50 | + build-and-test-debug: |
| 51 | + name: Test LLC (Debug) |
| 52 | + runs-on: macos-11 |
| 53 | + steps: |
| 54 | + - uses: actions/checkout@v1 |
| 55 | + - name: Set build image var |
| 56 | + run: echo "ImageVersion=$ImageVersion" >> $GITHUB_ENV |
| 57 | + - name: Cache RubyGems |
| 58 | + uses: actions/cache@v2 |
| 59 | + id: rubygem-cache |
| 60 | + with: |
| 61 | + path: vendor/bundle |
| 62 | + key: ${{ runner.os }}-${{ env.ImageVersion }}-gem-${{ hashFiles('**/Gemfile.lock') }} |
| 63 | + restore-keys: ${{ runner.os }}-${{ env.ImageVersion }}-gem- |
| 64 | + - name: Cache Mint |
| 65 | + uses: actions/cache@v2 |
| 66 | + id: mint-cache |
| 67 | + with: |
| 68 | + path: /usr/local/lib/mint |
| 69 | + key: ${{ runner.os }}-mint-${{ hashFiles('./Mintfile') }} |
| 70 | + restore-keys: ${{ runner.os }}-mint- |
| 71 | + - uses: ./.github/actions/bootstrap |
| 72 | + - name: Run LLC Tests (Debug) |
| 73 | + run: bundle exec fastlane test device:"iPhone 12" |
| 74 | + - uses: codecov/codecov-action@v1 |
| 75 | + with: |
| 76 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 77 | + flags: llc-tests |
| 78 | + fail_ci_if_error: true # if codecov upload fails, should fail ci |
| 79 | + verbose: true |
| 80 | + - uses: 8398a7/action-slack@v3 |
| 81 | + with: |
| 82 | + status: ${{ job.status }} |
| 83 | + text: "You shall not pass!" |
| 84 | + job_name: "Test LLC (Debug)" |
| 85 | + fields: message,commit,author,action,workflow,job,took |
| 86 | + env: |
| 87 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 88 | + MATRIX_CONTEXT: ${{ toJson(matrix) }} |
| 89 | + if: ${{ github.event_name == 'push' && failure() }} |
| 90 | + |
| 91 | + build-and-test-ui-debug: |
| 92 | + name: Test UI (Debug) |
| 93 | + runs-on: macos-11 |
| 94 | + steps: |
| 95 | + - uses: actions/checkout@v1 |
| 96 | + - name: Set build image var |
| 97 | + run: echo "ImageVersion=$ImageVersion" >> $GITHUB_ENV |
| 98 | + - name: Cache RubyGems |
| 99 | + uses: actions/cache@v2 |
| 100 | + id: rubygem-cache |
| 101 | + with: |
| 102 | + path: vendor/bundle |
| 103 | + key: ${{ runner.os }}-${{ env.ImageVersion }}-gem-${{ hashFiles('**/Gemfile.lock') }} |
| 104 | + restore-keys: ${{ runner.os }}-${{ env.ImageVersion }}-gem- |
| 105 | + - name: Cache Mint |
| 106 | + uses: actions/cache@v2 |
| 107 | + id: mint-cache |
| 108 | + with: |
| 109 | + path: /usr/local/lib/mint |
| 110 | + key: ${{ runner.os }}-mint-${{ hashFiles('./Mintfile') }} |
| 111 | + restore-keys: ${{ runner.os }}-mint- |
| 112 | + - uses: ./.github/actions/bootstrap |
| 113 | + - name: Prepare iPhone 12 with iOS 15.0 |
| 114 | + uses: ./.github/actions/prepare-ios-simulator |
| 115 | + with: |
| 116 | + device: "iPhone 12" |
| 117 | + ios: "15.0" |
| 118 | + xcode: "13.0" |
| 119 | + - name: Run UI Tests (Debug) |
| 120 | + run: bundle exec fastlane test_ui device:"iPhone 12 (15.0)" |
| 121 | + - uses: 8398a7/action-slack@v3 |
| 122 | + with: |
| 123 | + status: ${{ job.status }} |
| 124 | + text: "You shall not pass!" |
| 125 | + job_name: "Test UI (Debug)" |
| 126 | + fields: message,commit,author,action,workflow,job,took |
| 127 | + env: |
| 128 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 129 | + MATRIX_CONTEXT: ${{ toJson(matrix) }} |
| 130 | + if: ${{ github.event_name == 'push' && failure() }} |
| 131 | + |
| 132 | + build-xcode12: |
| 133 | + name: Build LLC + UI (Xcode 12) |
| 134 | + runs-on: macos-11 |
| 135 | + steps: |
| 136 | + - uses: actions/checkout@v1 |
| 137 | + - name: Set build image var |
| 138 | + run: echo "ImageVersion=$ImageVersion" >> $GITHUB_ENV |
| 139 | + - name: Cache RubyGems |
| 140 | + uses: actions/cache@v2 |
| 141 | + id: rubygem-cache |
| 142 | + with: |
| 143 | + path: vendor/bundle |
| 144 | + key: ${{ runner.os }}-${{ env.ImageVersion }}-gem-${{ hashFiles('**/Gemfile.lock') }} |
| 145 | + restore-keys: ${{ runner.os }}-${{ env.ImageVersion }}-gem- |
| 146 | + - name: Cache Mint |
| 147 | + uses: actions/cache@v2 |
| 148 | + id: mint-cache |
| 149 | + with: |
| 150 | + path: /usr/local/lib/mint |
| 151 | + key: ${{ runner.os }}-mint-${{ hashFiles('./Mintfile') }} |
| 152 | + restore-keys: ${{ runner.os }}-mint- |
| 153 | + - uses: ./.github/actions/bootstrap |
| 154 | + - name: Build LLC (Xcode 12) |
| 155 | + env: |
| 156 | + DEVELOPER_DIR: "/Applications/Xcode_12.5.1.app/Contents/Developer" |
| 157 | + run: bundle exec fastlane test device:"iPhone 12" build_for_testing:true |
| 158 | + - name: Build UI (Xcode 12) |
| 159 | + env: |
| 160 | + DEVELOPER_DIR: "/Applications/Xcode_12.5.1.app/Contents/Developer" |
| 161 | + run: bundle exec fastlane test_ui device:"iPhone 12" build_for_testing:true |
| 162 | + - uses: 8398a7/action-slack@v3 |
| 163 | + with: |
| 164 | + status: ${{ job.status }} |
| 165 | + text: "You shall not pass!" |
| 166 | + job_name: "Build LLC + UI (Xcode 12)" |
| 167 | + fields: message,commit,author,action,workflow,job,took |
| 168 | + env: |
| 169 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 170 | + MATRIX_CONTEXT: ${{ toJson(matrix) }} |
| 171 | + if: ${{ github.event_name == 'push' && failure() }} |
| 172 | + |
| 173 | + build-apps: |
| 174 | + name: Build Sample + Demo Apps |
| 175 | + runs-on: macos-11 |
| 176 | + steps: |
| 177 | + - uses: actions/checkout@v1 |
| 178 | + - name: Set build image var |
| 179 | + run: echo "ImageVersion=$ImageVersion" >> $GITHUB_ENV |
| 180 | + - name: Cache RubyGems |
| 181 | + uses: actions/cache@v2 |
| 182 | + id: rubygem-cache |
| 183 | + with: |
| 184 | + path: vendor/bundle |
| 185 | + key: ${{ runner.os }}-${{ env.ImageVersion }}-gem-${{ hashFiles('**/Gemfile.lock') }} |
| 186 | + restore-keys: ${{ runner.os }}-${{ env.ImageVersion }}-gem- |
| 187 | + - name: Cache Mint |
| 188 | + uses: actions/cache@v2 |
| 189 | + id: mint-cache |
| 190 | + with: |
| 191 | + path: /usr/local/lib/mint |
| 192 | + key: ${{ runner.os }}-mint-${{ hashFiles('./Mintfile') }} |
| 193 | + restore-keys: ${{ runner.os }}-mint- |
| 194 | + - uses: ./.github/actions/bootstrap |
| 195 | + - name: Build Sample App |
| 196 | + run: bundle exec fastlane build_sample |
| 197 | + - name: Build Demo App |
| 198 | + run: bundle exec fastlane build_demo |
| 199 | + - name: Build iMessageClone App |
| 200 | + run: bundle exec fastlane build_imessage_clone |
| 201 | + - name: Build SlackClone App |
| 202 | + run: bundle exec fastlane build_slack_clone |
| 203 | + - name: Build MessengerClone App |
| 204 | + run: bundle exec fastlane build_messenger_clone |
| 205 | + - name: Build YouTubeClone App |
| 206 | + run: bundle exec fastlane build_youtube_clone |
| 207 | + - uses: 8398a7/action-slack@v3 |
| 208 | + with: |
| 209 | + status: ${{ job.status }} |
| 210 | + text: "You shall not pass!" |
| 211 | + job_name: "Build Sample + Demo Apps" |
| 212 | + fields: message,commit,author,action,workflow,job,took |
| 213 | + env: |
| 214 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 215 | + MATRIX_CONTEXT: ${{ toJson(matrix) }} |
| 216 | + if: ${{ github.event_name == 'push' && failure() }} |
| 217 | + |
| 218 | + # build-docs-snippets: |
| 219 | + # name: Build Docs Snippets |
| 220 | + # runs-on: macos-11 |
| 221 | + # steps: |
| 222 | + # - uses: actions/checkout@v1 |
| 223 | + # - name: Set build image var |
| 224 | + # run: echo "ImageVersion=$ImageVersion" >> $GITHUB_ENV |
| 225 | + # - name: Cache RubyGems |
| 226 | + # uses: actions/cache@v2 |
| 227 | + # id: rubygem-cache |
| 228 | + # with: |
| 229 | + # path: vendor/bundle |
| 230 | + # key: ${{ runner.os }}-${{ env.ImageVersion }}-gem-${{ hashFiles('**/Gemfile.lock') }} |
| 231 | + # restore-keys: ${{ runner.os }}-${{ env.ImageVersion }}-gem- |
| 232 | + # - name: Build Docs Snippets |
| 233 | + # run: bundle exec fastlane build_docs_snippets |
| 234 | + # - uses: 8398a7/action-slack@v3 |
| 235 | + # with: |
| 236 | + # status: ${{ job.status }} |
| 237 | + # text: "You shall not pass!" |
| 238 | + # job_name: "Build Docs Snippets" |
| 239 | + # fields: message,commit,author,action,workflow,job,took |
| 240 | + # env: |
| 241 | + # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 242 | + # MATRIX_CONTEXT: ${{ toJson(matrix) }} |
| 243 | + # if: ${{ github.event_name == 'push' && failure() }} |
| 244 | + |
| 245 | + spm-integration: |
| 246 | + name: Test Integration (SPM) |
| 247 | + runs-on: macos-11 |
| 248 | + steps: |
| 249 | + - uses: actions/checkout@v1 |
| 250 | + - name: Set build image var |
| 251 | + run: echo "ImageVersion=$ImageVersion" >> $GITHUB_ENV |
| 252 | + - name: Cache RubyGems |
| 253 | + uses: actions/cache@v2 |
| 254 | + id: rubygem-cache |
| 255 | + with: |
| 256 | + path: vendor/bundle |
| 257 | + key: ${{ runner.os }}-${{ env.ImageVersion }}-gem-${{ hashFiles('**/Gemfile.lock') }} |
| 258 | + restore-keys: ${{ runner.os }}-${{ env.ImageVersion }}-gem- |
| 259 | + - name: Cache Mint |
| 260 | + uses: actions/cache@v2 |
| 261 | + id: mint-cache |
| 262 | + with: |
| 263 | + path: /usr/local/lib/mint |
| 264 | + key: ${{ runner.os }}-mint-${{ hashFiles('./Mintfile') }} |
| 265 | + restore-keys: ${{ runner.os }}-mint- |
| 266 | + - uses: ./.github/actions/bootstrap |
| 267 | + - name: Build Test Project |
| 268 | + run: bundle exec fastlane spm_integration |
| 269 | + - uses: 8398a7/action-slack@v3 |
| 270 | + with: |
| 271 | + status: ${{ job.status }} |
| 272 | + text: "You shall not pass!" |
| 273 | + job_name: "Test Integration (SPM)" |
| 274 | + fields: message,commit,author,action,workflow,job,took |
| 275 | + env: |
| 276 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 277 | + MATRIX_CONTEXT: ${{ toJson(matrix) }} |
| 278 | + if: ${{ github.event_name == 'push' && failure() }} |
| 279 | + |
| 280 | + cocoapods-integration: |
| 281 | + name: Test Integration (CocoaPods) |
| 282 | + runs-on: macos-11 |
| 283 | + steps: |
| 284 | + - uses: actions/checkout@v1 |
| 285 | + - name: Set build image var |
| 286 | + run: echo "ImageVersion=$ImageVersion" >> $GITHUB_ENV |
| 287 | + - name: Cache RubyGems |
| 288 | + uses: actions/cache@v2 |
| 289 | + id: rubygem-cache |
| 290 | + with: |
| 291 | + path: vendor/bundle |
| 292 | + key: ${{ runner.os }}-${{ env.ImageVersion }}-gem-${{ hashFiles('**/Gemfile.lock') }} |
| 293 | + restore-keys: ${{ runner.os }}-${{ env.ImageVersion }}-gem- |
| 294 | + - name: Cache Mint |
| 295 | + uses: actions/cache@v2 |
| 296 | + id: mint-cache |
| 297 | + with: |
| 298 | + path: /usr/local/lib/mint |
| 299 | + key: ${{ runner.os }}-mint-${{ hashFiles('./Mintfile') }} |
| 300 | + restore-keys: ${{ runner.os }}-mint- |
| 301 | + - uses: ./.github/actions/bootstrap |
| 302 | + - name: Build Test Project |
| 303 | + run: bundle exec fastlane cocoapods_integration |
| 304 | + - uses: 8398a7/action-slack@v3 |
| 305 | + with: |
| 306 | + status: ${{ job.status }} |
| 307 | + text: "You shall not pass!" |
| 308 | + job_name: "Test Integration (CocoaPods)" |
| 309 | + fields: message,commit,author,action,workflow,job,took |
| 310 | + env: |
| 311 | + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |
| 312 | + MATRIX_CONTEXT: ${{ toJson(matrix) }} |
| 313 | + if: ${{ github.event_name == 'push' && failure() }} |
0 commit comments