-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (31 loc) · 1.26 KB
/
run_linter_and_unit_tests.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
name: Run linter and unit tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Set Xcode version
run: |
ls -l /Applications | grep 'Xcode'
sudo xcode-select -s /Applications/Xcode_14.0.1.app
- name: Lint code using SwiftLint
run: swiftlint --strict --reporter github-actions-logging
- name: Build iOS
run: |
xcodebuild -scheme YNetwork -sdk iphonesimulator16.0 -destination 'platform=iOS Simulator,name=iPhone 14' build-for-testing
- name: Run tests iOS
run: |
xcodebuild -scheme YNetwork -sdk iphonesimulator16.0 -destination 'platform=iOS Simulator,name=iPhone 14' test-without-building
- name: Build tvOS
run: |
xcodebuild -scheme YNetwork -sdk appletvsimulator16.0 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation)' build-for-testing
- name: Run tests tvOS
run: |
xcodebuild -scheme YNetwork -sdk appletvsimulator16.0 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation)' test-without-building