Skip to content

Create swift.yml

Create swift.yml #6

Workflow file for this run

# 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
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 -scheme "AppUnitTest" -destination 'platform=iOS Simulator,name=iPhone 14'
# Step 4: Run tests
- name: Run tests
run: xcodebuild test -scheme "AppUnitTest" -destination 'platform=iOS Simulator,name=iPhone 14'