Skip to content

Run Swift format from linux runner #668

Run Swift format from linux runner

Run Swift format from linux runner #668

Workflow file for this run

name: Swift lint and format
on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
jobs:
swift-format:
name: Swift Format & Lint
runs-on: ubuntu-latest
container:
image: swift
volumes:
- ${{ github.workspace }}:${{ github.workspace }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: swift-format Format
working-directory: swift
run: |
swift format . --recursive --in-place --configuration .swift-format.json
/usr/bin/git diff --exit-code
- name: swift-format Lint
working-directory: swift
run: swift format lint . --recursive --strict --configuration .swift-format.json