Skip to content

Commit b94b754

Browse files
author
Matty Cross
committed
Add GitHub test action.
1 parent bc6bc58 commit b94b754

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/workflows/test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Run tests
2+
on: [push]
3+
# on:
4+
# push:
5+
# branches: [$default-branch]
6+
# pull_request:
7+
# branches: [$default-branch]
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
test_macOS:
14+
name: Build and Test on macOS
15+
runs-on: macos-15
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
- name: Test
20+
run: |
21+
make ci
22+
xcodebuild test -scheme "Cuckoo-macOS" -workspace Cuckoo.xcworkspace
23+
24+
test_iOS:
25+
name: Build and Test on iOS simulator
26+
runs-on: macos-15
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
- name: List available Xcode versions
31+
run: ls /Applications | grep Xcode
32+
- name: Show current version of Xcode
33+
run: xcodebuild -version
34+
- name: Test
35+
run: |
36+
make ci
37+
xcodebuild test -scheme "Cuckoo-iOS" -workspace Cuckoo.xcworkspace -destination "platform=iOS Simulator,name=iPhone 16,OS=18.0"

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,13 @@ init:
2020

2121
# Generate Cuckoo workspace.
2222
make dev
23+
24+
ci:
25+
# Install Tuist if not present.
26+
if ! command -v tuist &> /dev/null; then curl -Ls https://install.tuist.io | bash; fi
27+
28+
# Create generated mocks file which will be populated later.
29+
touch "Tests/Swift/Generated/GeneratedMocks.swift"
30+
31+
# Generate Cuckoo workspace.
32+
make dev

0 commit comments

Comments
 (0)