Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,22 @@ on:

jobs:
build:

name: Checks (Xcode ${{ matrix.xcode_version }})
runs-on: macos-11
env:
SCHEME: "swift-user-defaults"
DEVELOPER_DIR: '/Applications/Xcode_${{ matrix.xcode_version }}.app/Contents/Developer'

strategy:
matrix:
xcode_version: ['12.5', '13.1']
include:
- xcode_version: '12.5'
destination_ios: 'OS=14.5,name=iPhone 12'
destination_macos: 'platform=macOS'
- xcode_version: '13.1'
destination_ios: 'OS=15.0,name=iPhone 13'
destination_macos: 'platform=macOS'

steps:
- uses: actions/checkout@v2
Expand All @@ -20,13 +34,17 @@ jobs:
with:
bundler-cache: true

# Build
- name: Build
run: swift build -v
# Build library & Run Unit-Tests (MacOS)
- name: Build & Unit-Test Library (MacOS)
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme $SCHEME -destination "${{ matrix.destination_macos }}" clean test | bundle exec xcpretty

# Build library & Run Unit-Tests (iOS)
- name: Build & Unit-Test Library (iOS)
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme $SCHEME -destination "${{ matrix.destination_ios }}" clean test | bundle exec xcpretty

# Run Unit Tests
- name: Run tests
run: swift test -v
# Build Example Project & Run UI-Tests (iOS)
- name: Build & UI-Test Example Project (iOS)
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace "Example/Example.xcworkspace" -scheme "Example" -destination "${{ matrix.destination_ios }}" clean test | bundle exec xcpretty

# Verify CocoaPods
- name: Verify CocoaPods
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ source "https://rubygems.org"

# Cocoapods for iOS dependency management
gem 'cocoapods'

# XCPretty gem for ci workflow output formatting
gem 'xcpretty'
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ GEM
netrc (0.11.0)
public_suffix (4.0.6)
rexml (3.2.5)
rouge (2.0.7)
ruby-macho (2.5.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
Expand All @@ -85,6 +86,8 @@ GEM
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
xcpretty (0.3.0)
rouge (~> 2.0.7)
zeitwerk (2.5.1)

PLATFORMS
Expand All @@ -93,6 +96,7 @@ PLATFORMS

DEPENDENCIES
cocoapods
xcpretty

BUNDLED WITH
2.2.22