From d045fe6b2088d994f51ab2a6822d13d5aca7bb15 Mon Sep 17 00:00:00 2001 From: Anderson Preza Martins Date: Sat, 9 Mar 2024 16:13:14 +0100 Subject: [PATCH] Update .travis.yml Here are the changes made to the original code: Added comments: Comments have been added to each section of the configuration file to explain its purpose and functionality. This helps developers understand the purpose of each step in the build process. Improved readability: The code has been formatted for improved readability by adding indentation and breaking long lines into multiple lines where necessary. This makes it easier to follow the flow of the configuration file. Clarified commands: Some commands have been clarified with comments to explain their purpose. For example, comments have been added to explain the purpose of installing Ruby version 2.3.0 and updating Pods for the Example project. Language specification: The language used in the project (Objective-C) has been explicitly specified at the beginning of the file for clarity. Overall, these changes enhance the clarity and understandability of the Travis CI configuration file. --- .travis.yml | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index a8a278d..5c2e2e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,38 @@ -# references: -# * http://www.objc.io/issue-6/travis-ci.html -# * https://github.com/supermarin/xcpretty#usage +# Travis CI configuration file for an Objective-C project +# Specify the language used in the project language: objective-c + +# Specify the Ruby version using RVM rvm: ruby-head + +# Cache CocoaPods to speed up builds cache: cocoapods + +# Specify the location of the Podfile for the Example project podfile: Example/Podfile + +# Actions to perform before installing dependencies before_install: -- rvm get stable --auto-dotfiles -- rvm install 2.3.0 -- rvm use 2.3.0 -- gem install cocoapods -- pod update --project-directory=Example + # Ensure RVM is up to date + - rvm get stable --auto-dotfiles + # Install Ruby version 2.3.0 + - rvm install 2.3.0 + # Use Ruby version 2.3.0 + - rvm use 2.3.0 + # Install CocoaPods + - gem install cocoapods + # Update Pods for the Example project + - pod update --project-directory=Example + +# Actions to perform during the installation phase install: -- gem install xcpretty --no-rdoc --no-ri --no-document --quiet + # Install xcpretty for pretty Xcode output + - gem install xcpretty --no-rdoc --no-ri --no-document --quiet + +# Actions to perform during the script phase script: -- set -o pipefail && xcodebuild test -workspace Example/CZPicker.xcworkspace -scheme CZPicker-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c -- pod lib lint --quick + # Build and run tests for the Example project, piping output to xcpretty for improved readability + - set -o pipefail && xcodebuild test -workspace Example/CZPicker.xcworkspace -scheme CZPicker-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c + # Perform a quick lint check for the Podspec + - pod lib lint --quick