-
Notifications
You must be signed in to change notification settings - Fork 593
42 lines (35 loc) · 913 Bytes
/
swift.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Swift lint and format
on:
workflow_dispatch:
push:
branches: ["main"]
paths:
- "swift/**"
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
paths:
- "swift/**"
jobs:
swift-lint:
name: Swift Lint
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install SwiftLints
run: brew install swiftformat
- name: SwiftLint
working-directory: swift
run: swiftlint --config .swiftlint.yml --strict
swift-format:
name: Swift Format
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install SwiftFormat
run: brew install swiftformat
- name: SwiftFormat
working-directory: swift
run: swiftformat --lint --verbose **/*.swift