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