Workflow improvements #1016
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: Format check | |
defaults: | |
run: | |
shell: bash -eo pipefail {0} | |
# To factor this we likely require yaml anchors and aliases: | |
# https://yaml.org/spec/1.2-old/spec.html#id2765878 | |
# | |
# GitHub-actions YAML does not support achors and aliases: | |
# https://github.com/actions/runner/issues/1182 | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- "Docs/**" | |
- "**.md" | |
- "README.md" | |
- "LICENSE" | |
- ".gitignore" | |
pull_request: | |
branches: [ "**" ] | |
paths-ignore: | |
- "Docs/**" | |
- "**.md" | |
- "README.md" | |
- "LICENSE" | |
- ".gitignore" | |
jobs: | |
build: | |
name: Format check | |
runs-on: macos-latest | |
steps: | |
- name: install swift-format | |
run: | | |
brew install swift-format | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Check code format | |
run: swift-format lint -r --configuration .swift-format.json -p Sources Tests Package.swift |