Skip to content

CI

CI #1052

Workflow file for this run

name: CI
on:
push:
branches:
- main
- develop
paths-ignore:
- Docs/**
- README.md
- README.ja.md
- LICENSE
pull_request:
paths-ignore:
- Docs/**
- README.md
- README.ja.md
- LICENSE
workflow_dispatch:
permissions:
contents: read
env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app
MINT_PATH: .mint/lib
MINT_LINK_PATH: .mint/bin
jobs:
build:
name: build for ${{ matrix.environment }}
runs-on: macos-14
strategy:
fail-fast: false
matrix:
environment: ["develop", "production"]
steps:
# チェックアウト
- uses: actions/checkout@v3
# セットアップ
- uses: ./.github/workflows/templates/setup-ios
# ビルド
- name: Xcode build for ${{ matrix.environment }}
run: |
make build-debug-${{ matrix.environment }}
# ビルドログのアップロード
- name: Upload build log Artifact
uses: actions/upload-artifact@v3
if: failure()
with:
name: xcodebuild-logs
path: |
Reports/*_Build.log
if-no-files-found: ignore
retention-days: 14
test:
name: test for ${{ matrix.name }}
runs-on: macos-14
strategy:
fail-fast: false
matrix:
name: ["develop", "production", "app-module"]
steps:
# チェックアウト
- uses: actions/checkout@v3
# セットアップ
- uses: ./.github/workflows/templates/setup-ios
# モックの生成
- name: Generate mocks with Mockolo
run: make generate-mocks
# 単体テストの実行
- name: Xcode test
run: |
make test-debug-${{ matrix.name }}
# テスト結果のアップロード
- name: Upload test results Artifact
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: test-results
path: |
Reports/*.xcresult
if-no-files-found: error
retention-days: 14
# 単体テストログのアップロード
- name: Upload test log Artifact
uses: actions/upload-artifact@v3
if: failure()
with:
name: xcodebuild-logs
path: |
Reports/*_Test.log
if-no-files-found: ignore
retention-days: 14
show-test-results:
runs-on: macos-14
permissions:
checks: write
needs: test
steps:
# チェックアウト
- uses: actions/checkout@v3
# テスト結果のダウンロード
- name: Download test results artifact
uses: actions/download-artifact@v3
with:
name: test-results
path: Reports
# テスト結果のマージ
- name: Merge test results
run: make merge-test-results
# テスト結果の表示とアップロード
- uses: kishikawakatsumi/xcresulttool@v1
if: success() || failure()
with:
path: Reports/TestResults.xcresult
info:
runs-on: macos-14
steps:
# チェックアウト
- uses: actions/checkout@v3
# 情報の出力
- uses: ./.github/workflows/templates/output-info