From 7074609177e88db1b2a9699600b6f3e261255bf8 Mon Sep 17 00:00:00 2001 From: naoki-mrmt <20cm0135@jec.ac.jp> Date: Wed, 4 Jan 2023 15:18:26 +0900 Subject: [PATCH 1/2] add Xcode build command --- Task5/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Task5/Makefile b/Task5/Makefile index 1326965..918545c 100644 --- a/Task5/Makefile +++ b/Task5/Makefile @@ -5,3 +5,7 @@ WORKSPACE_NAME := ${PRODUCT_NAME}.xcworkspace generate: bundle exec pod install open ./${WORKSPACE_NAME} + +.PHONY: Xcode-build +Xcode-build: ## Xcode build command for CI + set -o pipefail && xcodebuild -sdk iphonesimulator -configuration Debug -workspace VolleyballScoreApp.xcworkspace -scheme VolleyballScoreApp build | bundle exec xcpretty From bab8a640d64d14f38bf2961c4fceeb1316d58683 Mon Sep 17 00:00:00 2001 From: naoki-mrmt <20cm0135@jec.ac.jp> Date: Wed, 4 Jan 2023 15:19:43 +0900 Subject: [PATCH 2/2] add CI file --- Task5/.github/workflows/swift.yml | 55 +++++++++++++++++++++++++++++++ Task5/Gemfile | 4 ++- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 Task5/.github/workflows/swift.yml diff --git a/Task5/.github/workflows/swift.yml b/Task5/.github/workflows/swift.yml new file mode 100644 index 0000000..b1bc7c5 --- /dev/null +++ b/Task5/.github/workflows/swift.yml @@ -0,0 +1,55 @@ +name: CI + +on: + push: + branches: + - master + - develop + paths-ignore: + - Docs/** + - README.md + pull_request: + branches: + - develop + paths-ignore: + - Docs/** + - README.md + +env: + DEVELOPER_DIR: /Applications/Xcode_14.2.app + +jobs: + test: + runs-on: macOS-latest + steps: + - uses: actions/checkout@v3 + - name: Show Xcode list + run: ls /Applications | grep 'Xcode' + - name: Show Xcode version + run: xcodebuild -version + - name: Install Bundled Gems + run: | + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + - name: Cache Pods + uses: actions/cache@v3 + with: + path: Pods + key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-pods- + - name: Install Pods + run: bundle exec pod install + - name: Xcode build + run: make Xcode-build + # テストが入っていないため一旦コメントアウト +# - name: Convert Code coverage to HTML +# run: bundle exec slather coverage --html --output-directory html_report + - uses: actions/upload-artifact@v3 + with: + name: test-results + path: build/reports + - uses: actions/upload-artifact@v3 + with: + name: test-coverage + path: html_report diff --git a/Task5/Gemfile b/Task5/Gemfile index 7fa22be..5645050 100644 --- a/Task5/Gemfile +++ b/Task5/Gemfile @@ -4,4 +4,6 @@ source "https://rubygems.org" git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } -gem 'cocoapods' \ No newline at end of file +gem 'cocoapods' +gem 'xcpretty' +gem 'slather' \ No newline at end of file