From 44bb7083e97534dcc4be52abddd946fa9f76803a Mon Sep 17 00:00:00 2001 From: Anand Nimje <19596311+ANSCoder@users.noreply.github.com> Date: Sat, 1 Feb 2025 15:18:45 +0530 Subject: [PATCH 1/2] Create swift.yml --- .github/workflows/swift.yml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/swift.yml diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml new file mode 100644 index 0000000..97f5115 --- /dev/null +++ b/.github/workflows/swift.yml @@ -0,0 +1,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 "RetailApp.xcodeproj" \ + -scheme "RetailApp" \ + -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 "RetailAppTests.xcodeproj" \ + -scheme "RetailAppTests" \ + -destination 'platform=iOS Simulator,name=iPhone 15' \ + CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" From 5df1c1d7ec467486d314e24bf4c47ef96ad624ac Mon Sep 17 00:00:00 2001 From: Anand Nimje <19596311+ANSCoder@users.noreply.github.com> Date: Sat, 1 Feb 2025 15:21:12 +0530 Subject: [PATCH 2/2] Update swift.yml updated project name. --- .github/workflows/swift.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 97f5115..8c02166 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -35,7 +35,7 @@ jobs: # Step 4: Run tests - name: Run tests run: | - xcodebuild test -project "RetailAppTests.xcodeproj" \ + xcodebuild test -project "RetailApp.xcodeproj" \ -scheme "RetailAppTests" \ -destination 'platform=iOS Simulator,name=iPhone 15' \ CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS=""