diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b3fe1b..f90386b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: run: gem install slather - name: Build and Test - run: xcodebuild -project EmpowerPlant.xcodeproj -scheme EmpowerPlant -configuration Debug -derivedDataPath build -destination "platform=iOS Simulator,OS=latest,name=iPhone 15" -quiet test | slather coverage --configuration Debug && exit ${PIPESTATUS[0]} + run: make test - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 diff --git a/.gitignore b/.gitignore index a53a8ed..611f2ac 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ .env build/ release-build.log -EmpowerPlant_release.zip \ No newline at end of file +EmpowerPlant_release.zip +slather/ \ No newline at end of file diff --git a/Makefile b/Makefile index 50e8029..b62db73 100644 --- a/Makefile +++ b/Makefile @@ -17,3 +17,8 @@ init: # download iOS platform image # (happens on fresh xcode installation or MAS-managed major version update) xcodebuild -downloadPlatform iOS + +.PHONY: test +test: + xcodebuild -project EmpowerPlant.xcodeproj -scheme EmpowerPlant -configuration Debug -derivedDataPath build -destination "platform=iOS Simulator,OS=latest,name=iPhone 15" -quiet build-for-testing + xcodebuild -project EmpowerPlant.xcodeproj -scheme EmpowerPlant -configuration Debug -derivedDataPath build -destination "platform=iOS Simulator,OS=latest,name=iPhone 15" -quiet test-without-building | rbenv exec slather coverage --verbose && exit ${PIPESTATUS[0]}