Skip to content

Commit

Permalink
Add scan and test result upload
Browse files Browse the repository at this point in the history
  • Loading branch information
jdee committed Jun 11, 2021
1 parent f6b2e9c commit 20a0aa1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,11 @@ jobs:
run: |
bundle config set --local path vendor
bundle check || bundle install
- name: Install CocoaPods dependencies
run: bundle exec fastlane prepare_pods
- name: Run unit tests
run: bundle exec fastlane unit_tests
- name: Upload test results
uses: actions/upload-artifact@v2
if: always() # even if tests fail
with:
name: test-results
path: fastlane/test_output
10 changes: 9 additions & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@ fastlane_version "2.69.0"

lane :prepare_pods do
# This helps optimize CI with caching by testing whether a pod install is necessary
pod_install_if_required '../Branch-TestBed', verbose: true
pod_install_if_required '../Branch-TestBed'
# Can also turn on verbose output and disable repo update
# pod_install_if_required '../Branch-TestBed', verbose: true, repo_update: false
end

lane :unit_tests do
prepare_pods
# Parameters in Scanfile. Can be passed/overriden here too.
scan
end
4 changes: 4 additions & 0 deletions fastlane/Scanfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
workspace 'Branch-TestBed/Branch-TestBed.xcworkspace'
scheme 'Branch-TestBed' # What would be selected when you press cmd-U
device 'iPhone 12'
output_types 'junit'

0 comments on commit 20a0aa1

Please sign in to comment.