From 541943a03f28a18e9608f28d84e13ab39d4baaea Mon Sep 17 00:00:00 2001 From: Bob Godwin Date: Thu, 12 Mar 2020 11:18:43 +0100 Subject: [PATCH 1/6] Intial introduction of GitHub Actions for CI/CD --- .github/workflows/swift.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/swift.yml diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml new file mode 100644 index 0000000..5dbdb4f --- /dev/null +++ b/.github/workflows/swift.yml @@ -0,0 +1,19 @@ +name: Swift + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + - name: Build + run: swift build -v + - name: Run tests + run: swift test -v From c2d03f80e5125274242012caae4f53a1bbbece9f Mon Sep 17 00:00:00 2001 From: Bob Godwin Date: Thu, 12 Mar 2020 13:38:09 +0100 Subject: [PATCH 2/6] Github Actions testing command --- .github/workflows/swift.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 5dbdb4f..1a367eb 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -13,7 +13,12 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Bootstrap Carthage + - run: carthage update --no-use-binaries - name: Build run: swift build -v - name: Run tests - run: swift test -v + run: xcodebuild test SWIFT_VERSION=5.1 + -workspace RxCoreLocation.xcworkspace + -scheme 'RxCoreLocation-iOS' -sdk iphonesimulator + -destination "name=iPhone X" | xcpretty -c --test From 0ffc4731f6642a078e56a8a376d8c0ed6dd75d53 Mon Sep 17 00:00:00 2001 From: Bob Godwin Date: Thu, 12 Mar 2020 13:39:54 +0100 Subject: [PATCH 3/6] Update swift.yml --- .github/workflows/swift.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 1a367eb..d38e302 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -18,7 +18,7 @@ jobs: - name: Build run: swift build -v - name: Run tests - run: xcodebuild test SWIFT_VERSION=5.1 + - run: xcodebuild test SWIFT_VERSION=5.1 -workspace RxCoreLocation.xcworkspace -scheme 'RxCoreLocation-iOS' -sdk iphonesimulator -destination "name=iPhone X" | xcpretty -c --test From 650c41352b9b29a439b8ad8df7b181772971b288 Mon Sep 17 00:00:00 2001 From: Bob Godwin Date: Thu, 12 Mar 2020 13:40:59 +0100 Subject: [PATCH 4/6] Update swift.yml --- .github/workflows/swift.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index d38e302..35c74eb 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -14,11 +14,11 @@ jobs: steps: - uses: actions/checkout@v2 - name: Bootstrap Carthage - - run: carthage update --no-use-binaries + run: carthage update --no-use-binaries - name: Build run: swift build -v - name: Run tests - - run: xcodebuild test SWIFT_VERSION=5.1 + run: xcodebuild test SWIFT_VERSION=5.1 -workspace RxCoreLocation.xcworkspace -scheme 'RxCoreLocation-iOS' -sdk iphonesimulator -destination "name=iPhone X" | xcpretty -c --test From 0bed7b23000cec249af907226e26237ff8b9b663 Mon Sep 17 00:00:00 2001 From: Bob Godwin Date: Thu, 12 Mar 2020 13:47:39 +0100 Subject: [PATCH 5/6] Update swift.yml --- .github/workflows/swift.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 35c74eb..011fd02 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -13,10 +13,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Bootstrap Carthage - run: carthage update --no-use-binaries - - name: Build - run: swift build -v + # - name: Bootstrap Carthage + # run: carthage update --no-use-binaries + # - name: Build + # run: swift build -v - name: Run tests run: xcodebuild test SWIFT_VERSION=5.1 -workspace RxCoreLocation.xcworkspace From 7dbd6d9a2850511c3b91d68a425f792e15d9726d Mon Sep 17 00:00:00 2001 From: bobgodwinx Date: Thu, 12 Mar 2020 15:42:58 +0100 Subject: [PATCH 6/6] Adding self-hosted example Signed-off-by: bobgodwinx --- .github/workflows/swift.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 011fd02..11c9ce5 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -9,16 +9,11 @@ on: jobs: build: - runs-on: macos-latest + runs-on: self-hosted steps: - uses: actions/checkout@v2 - # - name: Bootstrap Carthage - # run: carthage update --no-use-binaries - # - name: Build - # run: swift build -v + - name: Bootstrap Carthage + run: carthage update --no-use-binaries - name: Run tests - run: xcodebuild test SWIFT_VERSION=5.1 - -workspace RxCoreLocation.xcworkspace - -scheme 'RxCoreLocation-iOS' -sdk iphonesimulator - -destination "name=iPhone X" | xcpretty -c --test + run: xcodebuild test SWIFT_VERSION=5.1 -workspace RxCoreLocation.xcworkspace -scheme 'RxCoreLocation-iOS' -sdk iphonesimulator -destination "name=iPhone 11" | xcpretty -c --test