-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (41 loc) · 1.62 KB
/
code-checks.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
name: "Code checks"
run-name: Running code checks
on: [pull_request]
jobs:
lint:
name: Run SwiftLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: GitHub Action for SwiftLint
uses: norio-nomura/[email protected]
with:
args: --strict
build:
name: Build all targets
needs: lint
runs-on: macos-14
steps:
- name: Print job info
run: |
echo "The job was triggered by a ${{ github.event_name }} event and is now running on a ${{ runner.os }} server."
echo "The repository is ${{ github.repository }} and the branch is ${{ github.ref }}."
echo "Available XCode versions:"
sudo ls -1 /Applications | grep "Xcode"
echo "Selected XCode version:"
/usr/bin/xcodebuild -version
- uses: actions/checkout@v4
- name: Build Simulator
run: set -o pipefail && xcodebuild -scheme StreamDeckSimulator -destination "platform=iOS Simulator,name=iPad Air (5th generation),OS=latest" -skipMacroValidation | xcpretty
- name: Build Example
run: |
cd Example
set -o pipefail && xcodebuild -scheme "StreamDeckKitExample App" -destination "platform=iOS Simulator,name=iPad Air (5th generation),OS=latest" -skipMacroValidation | xcpretty
test:
name: Run unit tests
runs-on: macos-14
needs: build
steps:
- uses: actions/checkout@v4
- name: Test StreamDeckKit
run: set -o pipefail && xcodebuild -scheme StreamDeckKit-Package test -destination "platform=iOS Simulator,name=iPhone 15,OS=17.5" -skipMacroValidation | xcpretty