Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add CI #34

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions Task5/.github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion Task5/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

gem 'cocoapods'
gem 'cocoapods'
gem 'xcpretty'
gem 'slather'
4 changes: 4 additions & 0 deletions Task5/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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