Skip to content

Commit 1b54260

Browse files
authored
Merge pull request #19 from NakaokaRei/codex/add-pr-build-and-tests
Run build and unit tests for pull requests
2 parents 78dbe3f + a334b45 commit 1b54260

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

.github/workflows/test.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,41 @@
1-
name: Test
1+
name: Build and Test
22

33
on:
4+
pull_request:
45
push:
56
branches:
67
- main
7-
pull_request:
88

99
permissions:
1010
contents: read
1111

1212
concurrency:
13-
group: test-${{ github.ref }}
13+
group: build-and-test-${{ github.workflow }}-${{ github.ref }}
1414
cancel-in-progress: true
1515

1616
jobs:
17-
test:
17+
build-and-test:
1818
runs-on: macos-26
19+
timeout-minutes: 20
1920

2021
steps:
2122
- uses: actions/checkout@v6
2223

23-
- name: Run tests
24+
- name: Build app and tests
25+
run: |
26+
xcodebuild build-for-testing \
27+
-project TrackpadAir.xcodeproj \
28+
-scheme TrackpadAir \
29+
-destination 'platform=macOS' \
30+
-derivedDataPath "$RUNNER_TEMP/DerivedData" \
31+
CODE_SIGNING_ALLOWED=NO
32+
33+
- name: Run unit tests
2434
run: |
25-
xcodebuild test \
35+
xcodebuild test-without-building \
2636
-project TrackpadAir.xcodeproj \
2737
-scheme TrackpadAir \
2838
-destination 'platform=macOS' \
39+
-derivedDataPath "$RUNNER_TEMP/DerivedData" \
40+
-only-testing:TrackpadAirTests \
2941
CODE_SIGNING_ALLOWED=NO

0 commit comments

Comments
 (0)