Skip to content

Commit adbfe7f

Browse files
committed
Modernize CI workflow with Tuist
1 parent 58059d3 commit adbfe7f

1 file changed

Lines changed: 39 additions & 33 deletions

File tree

.github/workflows/ci.yml

Lines changed: 39 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,51 @@ name: CI
22

33
on:
44
push:
5+
branches: [main]
56
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
612

713
jobs:
814
test:
9-
runs-on: macOS-latest
10-
env:
11-
PROJECT: Then.xcodeproj
12-
SCHEME: Then-Package
15+
name: Test ${{ matrix.platform }}
16+
runs-on: macos-latest
1317
strategy:
18+
fail-fast: false
1419
matrix:
15-
env:
16-
- sdk: iphonesimulator
17-
destination: platform=iOS Simulator,name=iPhone 11 Pro,OS=latest
18-
19-
- sdk: macosx
20-
destination: arch=x86_64
21-
22-
- sdk: appletvsimulator
20+
include:
21+
- platform: iOS
22+
scheme: Then-iOS
23+
destination: platform=iOS Simulator,name=iPhone 16,OS=latest
24+
- platform: macOS
25+
scheme: Then-macOS
26+
destination: platform=macOS
27+
- platform: tvOS
28+
scheme: Then-tvOS
2329
destination: platform=tvOS Simulator,name=Apple TV,OS=latest
30+
- platform: watchOS
31+
scheme: Then-watchOS
32+
destination: platform=watchOS Simulator,name=Apple Watch Series 10 (46mm),OS=latest
2433

2534
steps:
26-
- uses: actions/checkout@v1
27-
28-
- name: List SDKs and Devices
29-
run: xcodebuild -showsdks; instruments -s
30-
31-
- name: Generate Xcode Project
32-
run: swift package generate-xcodeproj
33-
34-
- name: Build and Test
35-
run: |
36-
set -o pipefail && xcodebuild clean build test \
37-
-project "$PROJECT" \
38-
-scheme "$SCHEME" \
39-
-sdk "$SDK" \
40-
-destination "$DESTINATION" \
41-
-configuration Debug \
42-
-enableCodeCoverage YES \
43-
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c;
44-
env:
45-
SDK: ${{ matrix.env.sdk }}
46-
DESTINATION: ${{ matrix.env.destination }}
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
38+
- name: Install Tuist
39+
run: brew install tuist
40+
41+
- name: Generate project
42+
run: tuist generate --no-open
43+
44+
- name: Build and Test
45+
run: |
46+
xcodebuild clean build test \
47+
-project Then.xcodeproj \
48+
-scheme "${{ matrix.scheme }}" \
49+
-destination "${{ matrix.destination }}" \
50+
-enableCodeCoverage YES \
51+
CODE_SIGN_IDENTITY="" \
52+
CODE_SIGNING_REQUIRED=NO

0 commit comments

Comments
 (0)