Skip to content

Commit eaa9eaf

Browse files
Mark Pospeselmpospese
authored andcommitted
Add GH action
1 parent e44ddf9 commit eaa9eaf

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
25+
- name: Lint code using SwiftLint
26+
run: swiftlint --strict --reporter github-actions-logging
27+
28+
- name: Build iOS
29+
run: |
30+
xcodebuild -scheme YCoreUI -sdk iphonesimulator16.0 -destination 'platform=iOS Simulator,name=iPhone 14' build-for-testing
31+
32+
- name: Run tests iOS
33+
run: |
34+
xcodebuild -scheme YCoreUI -sdk iphonesimulator16.0 -destination 'platform=iOS Simulator,name=iPhone 14' test-without-building
35+
36+
- name: Build tvOS
37+
run: |
38+
xcodebuild -scheme YCoreUI -sdk appletvsimulator16.0 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation)' build-for-testing
39+
40+
- name: Run tests tvOS
41+
run: |
42+
xcodebuild -scheme YCoreUI -sdk appletvsimulator16.0 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation)' test-without-building

0 commit comments

Comments
 (0)