iOS GitHub Actions 自动化测试 - iOS-helper-action

540 阅读1分钟

Overview

GitHub Actions 自动化测试中, 为每个项目单独配置 workflow file 很繁琐.

使用 iOS-helper-action, 可让每个项目使用使用同样的 workflow file 完成自动化测试.

Usage

创建 workflow file

mkdir -p .github/workflows
vi .github/workflows/iOS-test.yml
name: iOS testing

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    name: Build and Test default scheme using any available iPhone simulator
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v2
      - name: swiftlint
        uses: BlueIntent/iOS-helper-action@v0.0.1
        with:
          action: 'swiftlint'
      - name: pod lib lint
        uses: BlueIntent/iOS-helper-action@v0.0.1
        with:
          action: 'pod-lib-lint'
      - name: install
        uses: BlueIntent/iOS-helper-action@v0.0.1
        with:
          action: 'install'
      - name: test
        uses: BlueIntent/iOS-helper-action@v0.0.1
        with:
          action: 'test'

Examples

Homepage