-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
66 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Code Quality Check / Perform Unit Testing | ||
|
||
on: | ||
pull_request: | ||
|
||
concurrency: | ||
# New commit on branch cancels running workflows of the same branch | ||
group: ${{ github.workflow }}-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
environment: sdds | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Xcode | ||
uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: 'latest' | ||
|
||
- name: Run build script | ||
run: | | ||
chmod +x ./scripts/build.sh | ||
./scripts/build.sh | ||
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
source "$(dirname "$0")/pretty_echo.sh" | ||
|
||
PROJECT_ROOT_DIR="$(dirname "$0")/.." | ||
PROJECT_ROOT_DIR=$(cd "$PROJECT_ROOT_DIR" && pwd) | ||
print_info "Root directory is ${PROJECT_ROOT_DIR}" | ||
|
||
WORKSPACE_NAME="SDDS.xcworkspace" | ||
WORKSPACE_PATH="${PROJECT_ROOT_DIR}/${WORKSPACE_NAME}" | ||
print_info "XCWorkspace path is ${PROJECT_ROOT_DIR}" | ||
|
||
modules=("SDDSSwiftUI" "SDDSUIKit" "SDDSIcons" "SDDSCore") | ||
|
||
print_info "Running tests for all targets..." | ||
for MODULE in "${!modules[@]}"; do | ||
SCHEME=${modules[$MODULE]} | ||
XCODE_PROJECT_PATH="${PROJECT_ROOT_DIR}/${SCHEME}/${SCHEME}.xcodeproj" | ||
|
||
print_info "Running tests for the scheme $SCHEME" | ||
|
||
SKIP_LINT=YES xcodebuild -scheme ${SCHEME} -workspace ${WORKSPACE_PATH} -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 15 Pro Max' test | ||
|
||
if [ $? -ne 0 ]; then | ||
print_error "Tests failed for the scheme $SCHEME." | ||
exit 1 | ||
else | ||
print_success "Tests succeeded for the scheme $SCHEME" | ||
fi | ||
|
||
done | ||
|
||
print_success "All tests succeeded" |