[CI] simplify setup (#69) #121
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub Actions Virtual Environments | |
# https://github.com/actions/virtual-environments/ | |
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
PROJECT: StatusItemController.xcodeproj | |
SCHEME: StatusItemController | |
EXAMPLE_PROJECT: Example/ExampleApp.xcodeproj | |
EXAMPLE_SCHEME: ExampleApp | |
DEVELOPER_DIR: /Applications/Xcode_15.1.app/Contents/Developer | |
MACOS_DEST: "platform=macOS,arch=x86_64" | |
jobs: | |
env-details: | |
name: Environment details | |
runs-on: macOS-13 | |
steps: | |
- name: xcode version | |
run: xcodebuild -version -sdk | |
test-macOS: | |
name: Tests | |
runs-on: macOS-13 | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: unit tests | |
run: | | |
set -o pipefail | |
xcodebuild clean test \ | |
-project "$PROJECT" \ | |
-scheme "$SCHEME" \ | |
-destination "$MACOS_DEST" \ | |
CODE_SIGN_IDENTITY="-" | xcpretty -c | |
- name: ui tests | |
run: | | |
set -o pipefail | |
xcodebuild clean test \ | |
-project "$EXAMPLE_PROJECT" \ | |
-scheme "$EXAMPLE_SCHEME" \ | |
-destination "$MACOS_DEST" \ | |
CODE_SIGN_IDENTITY="-" | xcpretty -c |