Update validate-swift.yml

This commit is contained in:
Marc Rousavy 2021-02-23 12:38:59 +01:00
parent e71a708774
commit 3f4c1c112e

View File

@ -1,18 +1,18 @@
name: Validate Swift
on: push
# push:
# branches:
# - master
# paths:
# - ".github/workflows/validate-swift.yaml"
# - "ios/"
# - "example/ios/"
# pull_request:
# paths:
# - ".github/workflows/validate-swift.yaml"
# - "ios/"
# - "example/ios/"
on:
push:
branches:
- master
paths:
- ".github/workflows/validate-swift.yaml"
- "ios/"
- "example/ios/"
pull_request:
paths:
- ".github/workflows/validate-swift.yaml"
- "ios/"
- "example/ios/"
jobs:
SwiftLint:
@ -27,21 +27,20 @@ jobs:
env:
# DIFF_BASE: ${{ github.base_ref }}
WORKING_DIRECTORY: ios
SwiftFormat:
name: SwiftFormat
description: 'https://github.com/nicklockwood/SwiftFormat'
runs:
using: 'docker'
image: 'Dockerfile'
env:
working-directory: ./ios
steps:
- uses: actions/checkout@v2
# TODO: Figure out how to run SwiftFormat in a GitHub action
# SwiftFormat:
# name: SwiftFormat
# description: 'https://github.com/nicklockwood/SwiftFormat'
# runs-on: ubuntu-latest
# env:
# working-directory: ./ios
# steps:
# - uses: actions/checkout@v2
- name: Format Swift code
run: swiftformat --verbose .
working-directory: ${{env.working-directory}}
# - 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}}
# - name: Verify formatted code is unchanged
# run: git diff --exit-code HEAD
# working-directory: ${{env.working-directory}}