Skip to content

Commit 6bc1fad

Browse files
committed
Add swiftlint to github actions
1 parent 4e905c0 commit 6bc1fad

File tree

2 files changed

+34
-4
lines changed

2 files changed

+34
-4
lines changed

.github/workflows/test.yml

+33-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
push:
88

99
jobs:
10-
test:
10+
lint:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v3
@@ -19,4 +19,35 @@ jobs:
1919
- run: yarn install
2020

2121
- run: yarn lint
22-
- run: yarn typecheck
22+
23+
typecheck:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v3
27+
- uses: actions/setup-node@v3
28+
with:
29+
node-version-file: .nvmrc
30+
cache: yarn
31+
32+
- run: yarn install
33+
34+
- run: yarn typecheck
35+
36+
swift-lint:
37+
runs-on: macos-latest
38+
steps:
39+
- uses: actions/checkout@v3
40+
- uses: actions/setup-node@v3
41+
with:
42+
node-version-file: .nvmrc
43+
cache: npm
44+
45+
# - run: yarn install
46+
47+
- run: npm install
48+
working-directory: example/ios
49+
50+
- run: pod install
51+
working-directory: example/ios
52+
53+
- run: example/ios/Pods/SwiftLint/swiftlint lint

.husky/pre-commit

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
swift format -i -p -r ./targets ./ios ./example/ios
2-
example/ios/Pods/SwiftLint/swiftlint lint --fix
3-
2+
example/ios/Pods/SwiftLint/swiftlint lint --fix

0 commit comments

Comments
 (0)