react-native-vision-camera/.github/workflows/validate-ios.yml
2021-02-23 14:35:55 +01:00

46 lines
1.1 KiB
YAML

name: Validate iOS
on:
push:
branches:
- main
paths:
- '.github/workflows/validate-ios.yml'
- 'ios/**'
pull_request:
paths:
- '.github/workflows/validate-ios.yml'
- 'ios/**'
jobs:
lint:
name: SwiftLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run SwiftLint GitHub Action (--strict)
uses: norio-nomura/action-swiftlint@3.2.1
with:
args: --strict
env:
# DIFF_BASE: ${{ github.base_ref }}
WORKING_DIRECTORY: ios
# TODO: Figure out how to run SwiftFormat in a GitHub action
# SwiftFormat:
# name: SwiftFormat
# description: 'https://github.com/nicklockwood/SwiftFormat'
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: ./ios
# steps:
# - uses: actions/checkout@v2
# - name: Format Swift code
# run: swiftformat --verbose .
# working-directory: ${{env.working-directory}}
# - name: Verify formatted code is unchanged
# run: git diff --exit-code HEAD
# working-directory: ${{env.working-directory}}