Skip to content

Commit ca84cfe

Browse files
committed
Cache linter installations in CI
1 parent 4b0c2ef commit ca84cfe

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

.github/workflows/lint.yml

+16-8
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,21 @@ jobs:
1313
- name: Check out Git repository
1414
uses: actions/checkout@v2
1515

16-
- name: Install dependencies
17-
run: |
18-
brew install mint
19-
mint install nicklockwood/[email protected]
20-
mint install realm/[email protected]
16+
- name: Install Homebrew dependencies
17+
run: brew install mint
18+
19+
- name: Restore Mint cache
20+
id: mint-cache
21+
uses: actions/cache@v1
22+
with:
23+
path: /usr/local/lib/mint/
24+
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
25+
26+
- name: Install Mint dependencies
27+
if: steps.mint-cache.outputs.cache-hit != 'true'
28+
run: mint bootstrap
2129

22-
- name: Lint
30+
- name: Run linters
2331
run: |
24-
swiftlint --quiet --strict
25-
swiftformat --lint .
32+
mint run swiftlint --quiet --strict
33+
mint run swiftformat --lint .

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ jobs:
1313
- name: Check out Git repository
1414
uses: actions/checkout@v2
1515

16-
- name: Test
16+
- name: Run tests
1717
run: xcodebuild clean test -workspace ./.swiftpm/xcode/package.xcworkspace -scheme SwiftExec

Mintfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nicklockwood/[email protected]
2+

0 commit comments

Comments
 (0)