Skip to content

Bump actions/checkout from 3 to 4 #11

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #11

Workflow file for this run

name: Swift
on:
push:
branches:
- main
paths:
- ".github/workflows/swift.yaml"
- "**.swift"
- "**/Package.resolved"
pull_request:
paths:
- ".github/workflows/swift.yaml"
- "**.swift"
- "**/Package.resolved"
jobs:
format:
name: Check SwiftFormat
runs-on: ubuntu-latest
timeout-minutes: 10
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 Swift packages
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run tests
run: swift test --enable-test-discovery