mirror of
https://github.com/otaviocc/Triton.git
synced 2026-01-30 04:04:27 +00:00
Add GitHub Action to Run Unit Tests
This commit is contained in:
parent
2cae75f8c6
commit
6dc6132f36
1 changed files with 19 additions and 9 deletions
28
.github/workflows/pr-checks.yml
vendored
28
.github/workflows/pr-checks.yml
vendored
|
|
@ -23,6 +23,17 @@ jobs:
|
||||||
- name: Show Xcode version
|
- name: Show Xcode version
|
||||||
run: xcodebuild -version
|
run: xcodebuild -version
|
||||||
|
|
||||||
|
- name: Install swiftformat
|
||||||
|
run: brew install swiftformat
|
||||||
|
|
||||||
|
- name: Check code formatting
|
||||||
|
run: |
|
||||||
|
swiftformat --lint .
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "❌ Code formatting issues detected. Please run 'swiftformat .' locally to fix."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Cache Swift Package Manager
|
- name: Cache Swift Package Manager
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -46,13 +57,12 @@ jobs:
|
||||||
| xcpretty || exit 1
|
| xcpretty || exit 1
|
||||||
continue-on-error: false
|
continue-on-error: false
|
||||||
|
|
||||||
- name: Install swiftformat
|
- name: Run OMG Tests
|
||||||
run: brew install swiftformat
|
|
||||||
|
|
||||||
- name: Check code formatting
|
|
||||||
run: |
|
run: |
|
||||||
swiftformat --lint .
|
xcodebuild test \
|
||||||
if [ $? -ne 0 ]; then
|
-project OMG.xcodeproj \
|
||||||
echo "❌ Code formatting issues detected. Please run 'swiftformat .' locally to fix."
|
-scheme OMG \
|
||||||
exit 1
|
-configuration Debug \
|
||||||
fi
|
-destination 'platform=macOS' \
|
||||||
|
| xcpretty || exit 1
|
||||||
|
continue-on-error: false
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue