Skip to content

Fix SwiftLint violations #81

Fix SwiftLint violations

Fix SwiftLint violations #81

Workflow file for this run

name: Xcode
on: [push]
jobs:
ios:
name: "Xcode ${{ matrix.env.xcode }}, ${{ matrix.env.runtime }}, ${{ matrix.env.device }}"
runs-on: macOS-12
strategy:
matrix:
env:
- xcode: 13.4
runtime: "iOS 15.5"
device: "iPhone 13 Pro"
- xcode: 13.4
runtime: "iOS 14.5"
device: "iPhone 12 Pro Max"
- xcode: 13.4
runtime: "iOS 13.7"
device: "iPhone 11"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: "Select Xcode ${{ matrix.env.xcode }}"
uses: ./.github/actions/xcode-select
with:
version: ${{ matrix.env.xcode }}
- name: "Cache downloaded simulator runtimes"
uses: actions/cache@v3
with:
path: ~/Library/Caches/XcodeInstall/*.dmg
key: Xcode ${{ matrix.env.xcode }}+${{ matrix.env.runtime }}
- name: "Prepare simulator"
id: prepare-simulator
uses: ./.github/actions/prepare-simulator
with:
runtime: ${{ matrix.env.runtime }}
device: ${{ matrix.env.device }}
- name: "Build and test"
run: |
set -o pipefail
xcodebuild test -workspace "OneTimePassword.xcworkspace" -scheme "OneTimePassword (iOS)" -destination "id=${{ steps.prepare-simulator.outputs.destination-id }}" | xcpretty -c
- uses: sersoft-gmbh/swift-coverage-action@v3
with:
target-name-filter: ^OneTimePassword$
- uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
watchos:
name: "Xcode ${{ matrix.env.xcode }}, ${{ matrix.env.runtime }}, ${{ matrix.env.device }}"
runs-on: macOS-12
strategy:
matrix:
env:
- xcode: 13.4
runtime: "watchOS 8.5"
device: "Apple Watch Series 7 - 45mm"
- xcode: 13.4
runtime: "watchOS 7.4"
device: "Apple Watch Series 6 - 44mm"
- xcode: 13.4
runtime: "watchOS 6.2"
device: "Apple Watch Series 4 - 40mm"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: "Select Xcode ${{ matrix.env.xcode }}"
uses: ./.github/actions/xcode-select
with:
version: ${{ matrix.env.xcode }}
- name: "Cache downloaded simulator runtimes"
uses: actions/cache@v3
with:
path: ~/Library/Caches/XcodeInstall/*.dmg
key: Xcode ${{ matrix.env.xcode }}+${{ matrix.env.runtime }}
- name: "Prepare simulator"
id: prepare-simulator
uses: ./.github/actions/prepare-simulator
with:
runtime: ${{ matrix.env.runtime }}
device: ${{ matrix.env.device }}
- name: "Build"
run: |
set -o pipefail
xcodebuild build -workspace "OneTimePassword.xcworkspace" -scheme "OneTimePassword (watchOS)" -destination "id=${{ steps.prepare-simulator.outputs.destination-id }}" | xcpretty -c