Skip to content

Workflow improvements #1017

Workflow improvements

Workflow improvements #1017

Workflow file for this run

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