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