changeset 44:c01d47dd6bb2

Merge remote-tracking branch 'origin/main'
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Sat, 01 May 2021 11:25:59 +0200
parents def21bbb1f67 (current diff) b18d0bac2f71 (diff)
children 26a91d7ce85e
files
diffstat 1 files changed, 21 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/.github/workflows/swift.yml	Sat May 01 11:01:31 2021 +0200
+++ b/.github/workflows/swift.yml	Sat May 01 11:25:59 2021 +0200
@@ -1,19 +1,29 @@
-name: Swift
+name: Swift package test
 
+# We will trigger this workflow whenever someone pushes or pull request to the repo.
 on:
-  push:
-    branches: [ main ]
-  pull_request:
-    branches: [ main ]
+   push:
+     branches: [ main ]
+   pull_request:
+     branches: [ main ]
 
 jobs:
   build:
 
-    runs-on: macos-latest
+    # We want our unit tests to be run on the latest available version of
+    # macOS that Github Actions supports.
+    runs-on: macOS-latest
 
     steps:
-    - uses: actions/checkout@v2
-    - name: Build
-      run: swift build -v
-    - name: Run tests
-      run: swift test -v
+    - uses: actions/checkout@v1
+    # 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 on iPhone 12
+      run: xcodebuild test -destination 'name=iPhone 12' -scheme 'StockCharts'