-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.19 KB
/
swift.yml
File metadata and controls
41 lines (34 loc) · 1.19 KB
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
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
# GitHub Actions workflow for building a Swift project
name: Swift CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: macos-latest
steps:
# Step 1: Checkout the code
- uses: actions/checkout@v4
# Step 2: Set up Xcode
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0.1'
# Step 3: Build the Xcode project
- name: Build Xcode project
run: |
xcodebuild -project "AppUnitTest.xcodeproj" \
-scheme "AppUnitTest" \
-destination 'platform=iOS Simulator,name=iPhone 15' \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS=""
# Step 4: Run tests
- name: Run tests
run: |
xcodebuild test -project "AppUnitTest.xcodeproj" \
-scheme "AppUnitTest" \
-destination 'platform=iOS Simulator,name=iPhone 15' \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS=""