Skip to content

Merge pull request #32 from alta/dependabot/submodules/Sources/Copus-… #89

Merge pull request #32 from alta/dependabot/submodules/Sources/Copus-…

Merge pull request #32 from alta/dependabot/submodules/Sources/Copus-… #89

Workflow file for this run

name: Swift
on:
push:
branches:
- main
paths:
- ".github/workflows/swift.yaml"
- ".gitmodules"
- "**.swift"
- "Package.resolved"
- "Sources/Copus"
pull_request:
paths:
- ".github/workflows/swift.yaml"
- ".gitmodules"
- "**.swift"
- "Package.resolved"
- "Sources/Copus"
jobs:
swiftformat:
name: SwiftFormat
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install SwiftFormat
uses: Cyberbeni/install-swift-tool@v2
with:
url: https://github.com/nicklockwood/SwiftFormat
- name: Format Swift code
run: swiftformat --verbose .
- name: Verify formatted code is unchanged
run: git diff --exit-code HEAD -w -G'(^[^# /])|(^#\w)|(^\s+[^#/])' # Ignore whitespace and comments
test:
name: Test
runs-on: macos-latest
timeout-minutes: 10
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Test
run: swift test
- name: Generate release build
run: swift build -c release