diff --git a/.circleci/config.yml b/.circleci/config.yml index 50ff68640..f42fcbd57 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,35 +1,17 @@ -version: 2 -jobs: - build_and_test: - macos: - xcode: "10.1.0" - steps: - - checkout - - restore_cache: - keys: - - wordpress-authenticator-ios-{{ checksum "Gemfile.lock" }}-{{ checksum "Podfile.lock" }} - - run: - name: Bundle install - command: bundle install --path=vendor/bundle - - run: - name: Fetch CocoaPods Specs - command: curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf - - run: - name: Pod Install - command: bundle exec pod install --repo-update - environment: - COCOAPODS_DISABLE_STATS: true - - save_cache: - key: wordpress-authenticator-ios-{{ checksum "Gemfile.lock" }}-{{ checksum "Podfile.lock" }} - paths: - - Pods/ - - vendor/bundle - - run: - name: Test - command: bundle exec pod lib lint +version: 2.1 + +orbs: + # This uses the iOS Orb located at https://github.com/wordpress-mobile/circleci-orbs + ios: wordpress-mobile/ios@0.0.10 + workflows: - version: 2 - wordpress_ios: + test_and_validate: jobs: - - build_and_test - + - ios/test: + name: Test + workspace: WordPressAuthenticator.xcworkspace + scheme: WordPressAuthenticator + destination: "platform=iOS Simulator,name=iPhone XS,OS=latest" + - ios/validate-podspec: + name: Validate Podspec + podspec-path: WordPressAuthenticator.podspec diff --git a/Gemfile b/Gemfile index 9d52fc591..761582567 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,6 @@ source 'https://rubygems.org' do gem 'cocoapods', '1.5.3' + gem 'cocoapods-check' + gem 'cocoapods-repo-update' + gem 'xcpretty' end diff --git a/Gemfile.lock b/Gemfile.lock index f4699f83b..7432cfc55 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -28,6 +28,8 @@ GEM nap (~> 1.0) ruby-macho (~> 1.1) xcodeproj (>= 1.5.7, < 2.0) + cocoapods-check (1.0.2) + cocoapods (~> 1.0) cocoapods-core (1.5.3) activesupport (>= 4.0.2, < 6) fuzzy_match (~> 2.0.4) @@ -36,6 +38,8 @@ GEM cocoapods-downloader (1.2.2) cocoapods-plugins (1.0.0) nap + cocoapods-repo-update (0.0.4) + cocoapods (~> 1.0, >= 1.3.0) cocoapods-search (1.0.0) cocoapods-stats (1.0.0) cocoapods-trunk (1.3.1) @@ -55,6 +59,7 @@ GEM nanaimo (0.2.6) nap (1.1.0) netrc (0.11.0) + rouge (2.0.7) ruby-macho (1.3.1) thread_safe (0.3.6) tzinfo (1.2.5) @@ -65,12 +70,17 @@ GEM claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.2.6) + xcpretty (0.3.0) + rouge (~> 2.0.7) PLATFORMS ruby DEPENDENCIES cocoapods (= 1.5.3)! + cocoapods-check! + cocoapods-repo-update! + xcpretty! BUNDLED WITH 1.17.2 diff --git a/Podfile b/Podfile index 5644b6a28..0582dc8a4 100644 --- a/Podfile +++ b/Podfile @@ -4,7 +4,7 @@ inhibit_all_warnings! use_frameworks! platform :ios, '10.0' - +plugin 'cocoapods-repo-update' ## WordPress Authenticator ## ======================= diff --git a/Podfile.lock b/Podfile.lock index 55c597ec8..f81f72352 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -121,6 +121,6 @@ SPEC CHECKSUMS: WordPressUI: 44fe43a9c5c504dfd534286e39e1ce6ebcd69ff5 wpxmlrpc: 6ba55c773cfa27083ae4a2173e69b19f46da98e2 -PODFILE CHECKSUM: 1b7831d7a214edf6e85e0d3e3ead39484c4058d4 +PODFILE CHECKSUM: e3a4b6f748b0b420639d2ee45f7fe40d82bd011d COCOAPODS: 1.5.3