1+ name : " validator"
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - dev
8+ pull_request :
9+ paths :
10+ - ' .swiftlint.yml'
11+ branches :
12+ - main
13+ - dev
14+
15+ concurrency :
16+ group : ci
17+ cancel-in-progress : true
18+
19+ jobs :
20+ SwiftLint :
21+ runs-on : ubuntu-latest
22+ steps :
23+ - uses : actions/checkout@v3
24+ - name : GitHub Action for SwiftLint
25+ uses : norio-nomura/action-swiftlint@3.2.1
26+ with :
27+ args : --strict
28+ env :
29+ DIFF_BASE : ${{ github.base_ref }}
30+ Old :
31+ name : Test Old (iOS, macOS, tvOS, watchOS)
32+ runs-on : macOS-11
33+ env :
34+ DEVELOPER_DIR : " /Applications/Xcode_13.2.app/Contents/Developer"
35+ timeout-minutes : 10
36+ strategy :
37+ fail-fast : false
38+ matrix :
39+ include :
40+ - destination : " OS=13.1,name=iPhone 12 Pro"
41+ name : " iOS"
42+ scheme : " Validator-Package"
43+ sdk : iphonesimulator
44+ - destination : " OS=13.1,name=Apple TV"
45+ name : " tvOS"
46+ scheme : " Validator-Package"
47+ sdk : appletvsimulator
48+ - destination : " OS=7,name=Apple Watch Series 6 (40mm)"
49+ name : " watchOS"
50+ scheme : " Validator-Package"
51+ sdk : watchsimulator
52+ - destination : " platform=macOS"
53+ name : " macOS"
54+ scheme : " Validator-Package"
55+ sdk : macosx
56+ steps :
57+ - uses : actions/checkout@v3
58+ - name : ${{ matrix.name }}
59+ run : xcodebuild test -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean | xcpretty
60+ Latest :
61+ name : Test Latest (iOS, macOS, tvOS, watchOS)
62+ runs-on : macOS-12
63+ env :
64+ DEVELOPER_DIR : " /Applications/Xcode_14.1.app/Contents/Developer"
65+ timeout-minutes : 10
66+ strategy :
67+ fail-fast : false
68+ matrix :
69+ include :
70+ - destination : " OS=16.1,name=iPhone 14 Pro"
71+ name : " iOS"
72+ scheme : " Validator-Package"
73+ sdk : iphonesimulator
74+ - destination : " OS=16.1,name=Apple TV"
75+ name : " tvOS"
76+ scheme : " Validator-Package"
77+ sdk : appletvsimulator
78+ - destination : " OS=9.1,name=Apple Watch Series 8 (45mm)"
79+ name : " watchOS"
80+ scheme : " Validator-Package"
81+ sdk : watchsimulator
82+ - destination : " platform=macOS"
83+ name : " macOS"
84+ scheme : " Validator-Package"
85+ sdk : macosx
86+ steps :
87+ - uses : actions/checkout@v3
88+ - name : ${{ matrix.name }}
89+ run : xcodebuild test -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "./${{ matrix.sdk }}.xcresult" | xcpretty -r junit
90+ - name : Upload coverage reports to Codecov
91+ uses : codecov/codecov-action@v3.1.0
92+ with :
93+ token : ${{ secrets.CODECOV_TOKEN }}
94+ xcode : true
95+ xcode_archive_path : " ./${{ matrix.sdk }}.xcresult"
0 commit comments