42 lines
878 B
YAML
Raw Normal View History

2021-02-23 14:29:59 +01:00
name: Validate iOS
2021-02-23 12:12:04 +01:00
2021-02-23 12:38:59 +01:00
on:
push:
branches:
2021-02-23 14:00:32 +01:00
- main
2021-02-23 12:38:59 +01:00
paths:
2021-02-23 14:29:59 +01:00
- '.github/workflows/validate-ios.yml'
2021-02-23 12:41:31 +01:00
- 'ios/**'
2021-02-23 12:38:59 +01:00
pull_request:
paths:
2021-02-23 14:29:59 +01:00
- '.github/workflows/validate-ios.yml'
2021-02-23 12:41:31 +01:00
- 'ios/**'
2021-02-23 12:12:04 +01:00
jobs:
2021-03-09 10:53:29 +01:00
SwiftLint:
2021-02-23 12:12:04 +01:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2021-02-23 13:59:42 +01:00
- name: Run SwiftLint GitHub Action (--strict)
2021-03-09 10:53:29 +01:00
uses: norio-nomura/action-swiftlint@master
2021-02-23 12:12:04 +01:00
with:
args: --strict
env:
WORKING_DIRECTORY: ios
2021-03-09 10:53:29 +01:00
SwiftFormat:
runs-on: macOS-latest
defaults:
run:
working-directory: ./ios
steps:
- uses: actions/checkout@v2
- name: Install SwiftFormat
run: brew install swiftformat
2021-02-23 12:12:04 +01:00
2021-03-09 10:53:29 +01:00
- name: Format Swift code
run: swiftformat --verbose .
2021-02-23 12:12:04 +01:00
2021-03-09 10:53:29 +01:00
- name: Verify formatted code is unchanged
run: git diff --exit-code HEAD