-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathTaskfile.yml
49 lines (41 loc) · 1.87 KB
/
Taskfile.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
43
44
45
46
47
48
49
# To run, you must install: https://taskfile.dev/installation/
version: '3'
tasks:
clean:
cmds:
- rm -rf Wendy.xcresult
- rm -rf .build
codegen:
cmds:
- mint run Sourcery --sources Source/ --templates Source/Templates --output Source/autogenerated
build:
cmds:
- task: clean
- task: codegen
- pod lib lint --allow-warnings
- set -o pipefail && xcrun xcodebuild -skipMacroValidation -skipPackagePluginValidation build -scheme Wendy -destination generic/platform=ios | xcbeautify
# to create command, get fastlane scan to run all tests, then you can copy the command it creates and run it directly. This is a small speed improvement.
test:
cmds:
- task: clean
- task: codegen
- set -o pipefail && xcodebuild -scheme Wendy -destination 'platform=iOS Simulator,name=iPhone 15' -derivedDataPath .build/derivedData -enableCodeCoverage YES build-for-testing | xcbeautify
- set -o pipefail && xcodebuild -scheme Wendy -destination 'platform=iOS Simulator,name=iPhone 15' -derivedDataPath .build/derivedData -enableCodeCoverage YES test-without-building | xcbeautify
# Resourced used to create this command:
# https://github.com/michaelhenry/swifty-code-coverage/
coverage:
preconditions:
- test -d .build/
vars:
OPTIONS: -instr-profile=$(find .build -name *.profdata | tail -n1) --ignore-filename-regex=Source/autogenerated/* --ignore-filename-regex=Tests/* --ignore-filename-regex=.build/*
SOURCE: $(find .build -name WendyTests.xctest | tail -n1)/WendyTests
cmds:
- xcrun llvm-cov export {{.OPTIONS}} -format=lcov "{{.SOURCE}}" > .build/lcov.info
- xcrun llvm-cov report {{.OPTIONS}} -use-color "{{.SOURCE}}"
lint:
cmds:
- mint run swiftlint lint --strict
format:
cmds:
- mint run swiftformat .
- mint run swiftlint lint --fix