@@ -3,56 +3,28 @@ name: CI-macOS
33# Controls when the action will run.
44# Triggers the workflow on pull request events but only for the master branch.
55on :
6- push :
7- branches : [ "develop" ]
86 pull_request :
9- branches : [ " develop" ]
7+ branches : [ develop ]
108
119# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1210jobs :
13- build :
14- runs-on : macos-14
15- timeout-minutes : 15
11+ # This workflow contains a single job called "build-and-test"
12+ build-and-test :
13+ # The type of runner that the job will run on
14+ runs-on : macos-15
1615
17- steps :
18- - name : Checkout project
19- uses : actions/checkout@v4
20-
21- - name : Select Xcode 16.2
22- run : sudo xcode-select -switch /Applications/Xcode_16.2.app
23-
24- - name : Show environment info
25- run : |
26- sw_vers
27- xcodebuild -version
28- xcrun simctl list devices
29-
30- - name : List available Xcode schemes (debugging)
31- run : xcodebuild -list
16+ timeout-minutes : 8
3217
33- - name : Build app
34- run : |
35- echo "🚀 Starting xcodebuild"
36- set -o pipefail && xcodebuild \
37- -scheme "CI" \
38- -sdk iphonesimulator \
39- -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.1' \
40- build | tee xcodebuild.log | xcpretty
41-
42- - name : Run Unit Tests
43- run : |
44- echo "🧪 Running Unit Tests"
45- set -o pipefail && xcodebuild \
46- -scheme "CI" \
47- -sdk iphonesimulator \
48- -destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=18.2' \
49- test | tee xctest.log | xcpretty
50-
51- - name : Upload raw logs on failure
52- if : failure()
53- uses : actions/upload-artifact@v4
54- with :
55- name : xcode-logs
56- path : |
57- xcodebuild.log
58- xctest.log
18+ # Steps represent a sequence of tasks that will be executed as part of the job
19+ steps :
20+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21+ - uses : actions/checkout@v4
22+
23+ - name : Select Xcode
24+ run : sudo xcode-select -switch /Applications/Xcode_16.2.app
25+
26+ - name : Xcode version
27+ run : /usr/bin/xcodebuild -version
28+
29+ - name : Build and Test
30+ run : xcodebuild clean build test -project EssentialFeed/EssentialFeed.xcodeproj -scheme "CI" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -sdk macosx -destination "platform=macOS" ONLY_ACTIVE_ARCH=YES
0 commit comments