Making Packet Sendable #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Swift | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "**.swift" | |
- "Package.resolved" | |
pull_request: | |
paths: | |
- "**.swift" | |
- "Package.resolved" | |
jobs: | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install swift-format | |
uses: Cyberbeni/install-swift-tool@v2 | |
with: | |
url: https://github.com/apple/swift-format | |
- name: Format Swift code | |
run: swift-format -r -i ./ | |
- name: Verify formatted code is unchanged | |
run: git diff --exit-code HEAD -w -G'(^[^# /])|(^#\w)|(^\s+[^#/])' # Ignore whitespace and comments |