File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ # https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
2
+
3
+ name : Swift
4
+ on : [push, pull_request]
5
+ jobs :
6
+ build :
7
+ name : Swift
8
+ runs-on : macos-latest
9
+ steps :
10
+ - run : brew install homebrew/cask/swift swiftlint
11
+ - uses : actions/checkout@v4
12
+ - run : swiftlint --version
13
+ - run : swiftlint --fix --quiet && git diff
14
+ - run : swiftlint --quiet | tee swiftlint.out.txt
15
+ - name : Failing SwiftLint rules
16
+ shell : python
17
+ run : |
18
+ with open("swiftlint.out.txt") as in_file:
19
+ errors = set(line.rsplit("(")[-1][:-2] for line in in_file if line.strip().endswith(")"))
20
+ print(f"{len(errors) = }\ndisabled_rules:")
21
+ print(" - " + "\n - ".join(sorted(errors)))
22
+ - run : swift build
23
+ - run : swift test
You can’t perform that action at this time.
0 commit comments