Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add xcresulttool GitHub Action #12

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,9 @@ jobs:
- name: Test
id: test
run: make test
- name: Zip XCResults
id: zip-xcresults
if: failure() && steps.test.conclusion == 'failure'
run: |
cd $(dirname $(find ${{ env.derived-data-path }} -name "*.xcresult" | head -n1))
zip -r xcresults.zip *.xcresult
- name: Upload XCResults
if: failure() && steps.zip-xcresults.conclusion == 'success'
uses: actions/upload-artifact@v2
- name: Process XCResult
uses: lunij/xcresulttool@marc/update
if: success() || failure()
with:
name: xcresults.zip
path: ./xcresults.zip
path: .derivedData/Netbob.xcresult
title: XCResult
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ XCODEBUILD_OPTIONS = \
-scheme $(SCHEME_PACKAGE) \
-workspace .

XCODEBUILD_TEST_OPTIONS = -resultBundlePath $(DERIVED_DATA_PATH)/$(SCHEME_PACKAGE)

export TUIST_STATS_OPT_OUT := true

.PHONY: setup-mise
Expand Down Expand Up @@ -47,7 +49,7 @@ build:

.PHONY: test
test:
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS) test-without-building | xcbeautify
set -o pipefail && xcodebuild $(XCODEBUILD_OPTIONS) $(XCODEBUILD_TEST_OPTIONS) test-without-building | xcbeautify

.PHONY: clean
clean:
Expand Down
9 changes: 9 additions & 0 deletions Tests/TestPlans/Netbob.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
}
],
"defaultOptions" : {
"codeCoverage" : {
"targets" : [
{
"containerPath" : "container:",
"identifier" : "Netbob",
"name" : "Netbob"
}
]
},
"language" : "en",
"region" : "US",
"testExecutionOrdering" : "random",
Expand Down
Loading