Skip to content
This repository has been archived by the owner on Dec 30, 2021. It is now read-only.

Commit

Permalink
Add code formatting job
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalezreal committed Oct 6, 2020
1 parent b60b871 commit 6f5909f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: SwiftFormat
on:
push:
branches:
- main
jobs:
format:
name: SwiftFormat
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Install
run: brew install swiftformat
- name: Format
run: make format
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Run swiftformat
branch: 'main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ test:
xcodebuild \
-scheme AdaptiveCardUI_watchOS \
-destination '$(DESTINATION_WATCHOS)'

format:
swiftformat .

.PHONY: format
2 changes: 1 addition & 1 deletion Tests/AdaptiveCardUITests/UI/ActionRenderingTests.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#if os(iOS) && canImport(SwiftUI)

import SwiftUI
import SnapshotTesting
import SwiftUI
import XCTest

import AdaptiveCardUI
Expand Down

0 comments on commit 6f5909f

Please sign in to comment.