Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

iOS Pull Request

paulomeurerzup edited this page Jan 11, 2021 · 8 revisions

This workflow is responsible for validating PRs opened for the iOS platform.

Workflow

This workflow will be executed on the following events:

push:
    branches:
        - master
    paths:
        - 'iOS/**'

pull_request:
    paths:
        - 'iOS/**'
        - 'Gemfile'

You can see it more detailed in the workflow file.

Overview

Step by step

This workflow defines a job called PR Check witch contains the following steps:

1. Load fastlane dependencies cache

It uses the github action cache for caching fastlane dependencies and build outputs to improve workflow execution time.

2. Install fastlane

Installs fastlane and its plugins.

3. Load SwiftPackageManager dependencies cache

It uses the github action cache for caching SPM dependencies and build outputs to improve workflow execution time.

4. Swiflint is installed for code analysis purposes

Installs swiftlint with brew.

5. Configure environment variables

Setup the needed environment variables.

6. Execute fastlane pull_request_verification lane

Fastlane steps are executed in pull_request_verification lane for the iOS platform.

7. Static code analysis

The lane starts specifying XCode version, which will be the version used to run the fastlane actions.

Perform static code analysis using Swiftlint.

8. Run tests

After the code is validated, the tests for Beagle workspace are executed specifying a device. This takes place in a fastlane action called scan.

9. Generate test coverage reports

Generates tests coverage report after running tests on step 8.

10. Upload tests report

Execute run_codecov fastlane lane.

This lane uses fastlane-plugin-codecov_reporter plugin to send code coverage informations to Codecov.io

11. Cocoapods integration

The lane check_if_beagle_works_via_cocoapods_integration is executed and in it, we verify Beagle integration via CocoaPods by doing a pod install in a workspace called CocoaPodsTest.

After building this project and running its tests, if no errors occurred, then the integration was successful.

Clone this wiki locally