-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (50 loc) 路 1.82 KB
/
Copy pathMakefile
File metadata and controls
67 lines (50 loc) 路 1.82 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Override with a shell-quoted file list to check only changed Swift files.
SWIFT_FILES ?= .
.PHONY: setup lint format test test-linux test-macos test-ios test-swift test-tvos test-watchos test-all
setup:
brew bundle install
brew upgrade
brew cleanup
brew autoremove
mint bootstrap
lefthook install
lint: lint-workflows
mint run --no-install realm/SwiftLint lint --config .swiftlint.yml --quiet --force-exclude $(SWIFT_FILES)
format:
mint run --no-install nicklockwood/SwiftFormat $(SWIFT_FILES) --config .swiftformat --quiet
mint run --no-install realm/SwiftLint lint --config .swiftlint.yml --fix --quiet --force-exclude $(SWIFT_FILES)
test-linux:
docker run \
--rm \
-v "$(PWD):$(PWD)" \
-w "$(PWD)" \
swift:6.3 \
bash -c 'swift test'
test-macos:
set -o pipefail && \
xcodebuild test \
-scheme swift-snapshot-testing-Package \
-destination platform="macOS" | mint run --no-install cpisciotta/xcbeautify -q
test-ios:
set -o pipefail && \
xcodebuild test \
-scheme swift-snapshot-testing-Package \
-destination platform="iOS Simulator,name=iPhone 17 Pro,OS=26.5" | mint run --no-install cpisciotta/xcbeautify -q
test: test-swift
test-swift:
set -o pipefail && \
swift test | mint run --no-install cpisciotta/xcbeautify -q
test-tvos:
set -o pipefail && \
xcodebuild test \
-scheme swift-snapshot-testing-Package \
-destination platform="tvOS Simulator,name=Apple TV 4K (3rd generation),OS=26.5" | mint run --no-install cpisciotta/xcbeautify -q
test-watchos:
set -o pipefail && \
xcodebuild test \
-scheme swift-snapshot-testing-Package \
-destination platform="watchOS Simulator,name=Apple Watch Series 11 (46mm),OS=26.5" | mint run --no-install cpisciotta/xcbeautify -q
test-all: test-swift test-macos test-ios test-tvos test-watchos test-linux
.PHONY: lint-workflows
lint-workflows:
actionlint