Skip to content

Commit 30dd7b3

Browse files
PanchamiShenoympospese
authored andcommitted
[CM-923] Added github action for swiftLint and unit test
1 parent 9343f1b commit 30dd7b3

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Run linter and unit tests
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
15+
runs-on: macos-12
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Set Xcode version
21+
run: |
22+
ls -l /Applications | grep 'Xcode'
23+
sudo xcode-select -s /Applications/Xcode_14.0.1.app
24+
- name: Lint code using SwiftLint
25+
run: swiftlint --strict --reporter github-actions-logging
26+
27+
- name: Build iOS
28+
run: |
29+
xcodebuild -scheme YMatterType -sdk iphonesimulator16.0 -destination 'platform=iOS Simulator,name=iPhone 14' build-for-testing
30+
31+
- name: Run tests iOS
32+
run: |
33+
xcodebuild -scheme YMatterType -sdk iphonesimulator16.0 -destination 'platform=iOS Simulator,name=iPhone 14' test-without-building
34+
- name: Build tvOS
35+
run: |
36+
xcodebuild -scheme YMatterType -sdk appletvsimulator16.0 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation)' build-for-testing
37+
38+
- name: Run tests tvOS
39+
run: |
40+
xcodebuild -scheme YMatterType -sdk appletvsimulator16.0 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation)' test-without-building

0 commit comments

Comments
 (0)