fix: linting; #32
Workflow file for this run
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: | |
- "**" | |
tags-ignore: | |
- "**" | |
paths: | |
- "**/*.swift" | |
- ".github/workflows/*.yml" | |
pull_request: | |
paths: | |
- "**/*.swift" | |
- ".github/workflows/*.yml" | |
jobs: | |
swift_lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run SwiftLint | |
run: | | |
docker run --rm -v `pwd`:`pwd` -w `pwd` \ | |
ghcr.io/realm/swiftlint:0.58.2 \ | |
swiftlint lint --strict --config .swiftlint.yml --reporter github-actions-logging | |
test: | |
runs-on: macos-latest | |
name: Xcode ${{ matrix.xcode }} | |
strategy: | |
matrix: | |
xcode: ["16.2"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set correct Xcode version | |
run: | | |
echo "Available Xcode versions:" | |
ls /Applications | grep Xcode | |
echo "Choosing Xcode_${{ matrix.xcode }}.app" | |
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app | |
xcodebuild -version | |
swift --version | |
swift package --version | |
- name: Resolve swift packages | |
run: swift package resolve | |
- name: Build Package | |
env: | |
SWIFTPM_ENABLE_PLUGINS: 1 | |
run: swift build -v | |
- name: Run tests | |
run: set -o pipefail && swift test 2>&1 | xcpretty | |
env: | |
SWIFTPM_ENABLE_PLUGINS: 1 |