Add GitHub Actions #11
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: Formatting and Linting | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
swift-format: | |
name: swift-format | |
runs-on: macOS-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Xcode Select Version | |
uses: mobiledevops/xcode-select-version-action@v1 | |
with: | |
xcode-select-version: 16.1 | |
- name: Format and lint | |
run: swift format lint -r -p -s . | |
SwiftLint: | |
name: SwiftLint | |
runs-on: macOS-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Xcode Select Version | |
uses: mobiledevops/xcode-select-version-action@v1 | |
with: | |
xcode-select-version: 16.1 | |
- name: Format and lint | |
run: swift package plugin --allow-writing-to-package-directory swiftlint lint --reporter github-actions-logging 2> /dev/null |