Skip to content

Add Format workflow #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- cron: '3 3 * * 2' # 3:03 AM, every Tuesday

concurrency:
group: ${{ github.ref }}
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -32,19 +32,19 @@ jobs:
- 5.6
- 5.7
steps:
- uses: actions/checkout@v2
- name: Test NavigationTransitions
uses: mxcl/xcodebuild@v1
with:
platform: ${{ matrix.platform }}
swift: ~${{ matrix.swift }}
action: test
scheme: NavigationTransitions
- if: ${{ matrix.swift >= 5.7 }}
name: Build Demo
uses: mxcl/xcodebuild@v1
with:
platform: ${{ matrix.platform }}
swift: ~${{ matrix.swift }}
action: build
scheme: Demo
- uses: actions/checkout@v2
- name: Test NavigationTransitions
uses: mxcl/xcodebuild@v1
with:
platform: ${{ matrix.platform }}
swift: ~${{ matrix.swift }}
action: test
scheme: NavigationTransitions
- if: ${{ matrix.swift >= 5.7 }}
name: Build Demo
uses: mxcl/xcodebuild@v1
with:
platform: ${{ matrix.platform }}
swift: ~${{ matrix.swift }}
action: build
scheme: Demo
25 changes: 25 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Format

on:
push:
branches:
- main

concurrency:
group: format-${{ github.ref }}
cancel-in-progress: true

jobs:
format:
name: swiftformat
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: Format
run: swiftformat
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Run SwiftFormat
branch: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.5
7 changes: 7 additions & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
--exclude **/RuntimeWarnings.swift
--disable redundantNilInit,redundantSelf,redundantType,unusedArguments

--header strip
--ifdef no-indent
--extensionacl on-declarations
--patternlet inline