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

Answer #1

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
93 changes: 93 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: CI

on:
push:
branches:
- main
- develop
paths-ignore:
- Docs/**
- README.md
pull_request:
branches:
- develop
paths-ignore:
- Docs/**
- README.md

env:
DEVELOPER_DIR: /Applications/Xcode_11.6.app/Contents/Developer

jobs:
test:
runs-on: macOS-latest
env:
MINT_PATH: mint/lib
MINT_LINK_PATH: mint/bin

steps:
# チェックアウト
- uses: actions/checkout@v2

# Bundlerで管理しているライブラリのキャッシュ
- name: Cache Gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-

# Bundlerで管理しているライブラリのインストール
- name: Install Bundled Gems
run: make install-bundler

# Mintのインストール
- name: Install Mint
run: brew install mint

# Mintで管理しているライブラリのキャッシュ
- name: Cache Mint packages
uses: actions/cache@v2
with:
path: mint
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
restore-keys: |
${{ runner.os }}-mint-

# Carthageで管理しているライブラリのキャッシュ
- name: Cache Carthage packages
uses: actions/cache@v2
with:
path: Carthage
key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }}
restore-keys: |
${{ runner.os }}-carthage-

# Carthageで管理しているライブラリのインストール
- name: Install Carthage frameworks
run: make install-carthage
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# CocoaPodsで管理しているライブラリのキャッシュ
- name: Cache Pods
uses: actions/cache@v2
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-

# プロジェクトファイルの生成、CocoaPodsで管理しているライブラリのインストール
- name: Generate Xcode project and install Pods
run: make generate-xcodeproj

# ビルド
- name: Xcode build
run: make build-debug

# 単体テストの実行
- name: Xcode test
run: make test

19 changes: 19 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: SwiftLint

on:
pull_request:
branches:
- develop
paths:
- '.github/workflows/swiftlint.yml'
- '.swiftlint.yml'
- '**/*.swift'

jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: GitHub Action for SwiftLint
uses: norio-nomura/[email protected]