Skip to content

Commit

Permalink
Divide test steps by OS in the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
DevYeom committed Sep 16, 2024
1 parent d0b511d commit 2549972
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 19 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,33 @@ concurrency:
cancel-in-progress: true

jobs:
ci:
iOS:
runs-on: macos-14
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: maxim-lobanov/[email protected]
with:
xcode-version: '15.4'
- name: Build and test
run: make test-ios
iPadOS:
runs-on: macos-14
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: maxim-lobanov/[email protected]
with:
xcode-version: '15.4'
- name: Build and test
run: make test-ipados
MacOS:
runs-on: macos-14
timeout-minutes: 30

steps:
- uses: actions/checkout@v3
- uses: maxim-lobanov/[email protected]
with:
xcode-version: '15.4'
- name: Build and Test
run: make test
- name: Build and test
run: make test-macos
42 changes: 27 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,32 @@ TEST_SCHEME = AppTests
TEST_PLAN = AppTests
CONFIG = debug

default: test
default: test-all

test:
for platform in \
"$(PLATFORM_IOS)" \
"$(PLATFORM_IPADOS)" \
"$(PLATFORM_MACOS)"; \
do \
xcodebuild test \
-project $(PROJECT) \
-scheme $(TEST_SCHEME) \
-testPlan $(TEST_PLAN) \
-configuration $(CONFIG) \
-destination platform="$$platform" || exit 1; \
done;
test-ios:
xcodebuild test \
-project $(PROJECT) \
-scheme $(TEST_SCHEME) \
-testPlan $(TEST_PLAN) \
-configuration $(CONFIG) \
-destination platform="$(PLATFORM_IOS)" || exit 1;

.PHONY: test
test-ipados:
xcodebuild test \
-project $(PROJECT) \
-scheme $(TEST_SCHEME) \
-testPlan $(TEST_PLAN) \
-configuration $(CONFIG) \
-destination platform="$(PLATFORM_IPADOS)" || exit 1;

test-macos:
xcodebuild test \
-project $(PROJECT) \
-scheme $(TEST_SCHEME) \
-testPlan $(TEST_PLAN) \
-configuration $(CONFIG) \
-destination platform="$(PLATFORM_MACOS)" || exit 1;

test-all: test-ios test-ipados test-macos

.PHONY: test-ios test-ipados test-macos test-all

0 comments on commit 2549972

Please sign in to comment.