# HG changeset patch # User Dennis C. M. # Date 1619861110 -7200 # Node ID b18d0bac2f71f9d7d81fe9672a171c3711c76841 # Parent c606924b2dd2cdf15aa2feca7b99cced14f940c2 Update swift.yml committer: GitHub diff -r c606924b2dd2 -r b18d0bac2f71 .github/workflows/swift.yml --- a/.github/workflows/swift.yml Sat May 01 11:21:50 2021 +0200 +++ b/.github/workflows/swift.yml Sat May 01 11:25:10 2021 +0200 @@ -1,7 +1,11 @@ -name: Unit Test +name: Swift package test -# We will trigger this workflow whenever someone pushes to the repo. -on: [push] +# We will trigger this workflow whenever someone pushes or pull request to the repo. +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] jobs: build: @@ -15,9 +19,11 @@ # Github Actions' machines do in fact have recent versions of Xcode, # but you may have to explicitly switch to them. We explicitly want # to use Xcode 11, so we use xcode-select to switch to it. + - name: Generate xcodeproj run: swift package generate-xcodeproj # Finally, we invoke xcodebuild to run the tests on an iPhone 11 # simulator. - - name: Run tests - run: xcodebuild test -destination 'name=iPhone 11' -scheme 'StockCharts' + + - name: Run tests on iPhone 12 + run: xcodebuild test -destination 'name=iPhone 12' -scheme 'StockCharts'