Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
iOS tests: Use xcresultparser instead of slather
Browse files Browse the repository at this point in the history
As for Element-X-iOS
  • Loading branch information
manuroe committed Apr 12, 2024
1 parent e2ae121 commit cd36f59
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 68 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Setup - Ruby and bundler dependencies
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Install xcresultparser
run: brew install a7ex/homebrew-formulae/xcresultparser

- name: Rust & Cargo cache
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -58,16 +57,14 @@ jobs:
working-directory: platforms/ios/example
run: exec ./ios-test-coverage.sh

- name: Run slather for unit tests
run: bundle exec slather
env:
GIT_BRANCH: ${{ steps.get_branch.outputs.branch }}
CI_PULL_REQUEST: ${{ github.event.number }}
- name: Collect coverage
working-directory: platforms/ios/example
run: xcresultparser -q -o cobertura -t Wysiwyg -p $(pwd) tests.xcresult > tests.xml

- name: Upload unit test coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: platforms/ios/lib/coverage
files: ./platforms/ios/example/tests.xml
fail_ci_if_error: true
flags: unittests-ios, unittests
# https://github.com/codecov/codecov-action/issues/557#issuecomment-1216749652
Expand All @@ -77,16 +74,14 @@ jobs:
working-directory: platforms/ios/example
run: exec ./ios-ui-test-coverage.sh

- name: Run slather for ui tests
run: bundle exec slather
env:
GIT_BRANCH: ${{ steps.get_branch.outputs.branch }}
CI_PULL_REQUEST: ${{ github.event.number }}
- name: Collect coverage
working-directory: platforms/ios/example
run: xcresultparser -q -o cobertura -t Wysiwyg -p $(pwd) ui-tests.xcresult > ui-tests.xml

- name: Upload ui test coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: platforms/ios/lib/coverage
files: ./platforms/ios/example/ui-tests.xml
fail_ci_if_error: true
flags: uitests-ios, uitests
# https://github.com/codecov/codecov-action/issues/557#issuecomment-1216749652
Expand Down
3 changes: 0 additions & 3 deletions Gemfile

This file was deleted.

49 changes: 0 additions & 49 deletions Gemfile.lock

This file was deleted.

1 change: 1 addition & 0 deletions platforms/ios/example/ios-test-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ xcodebuild \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 15,OS=17.2' \
-derivedDataPath ./DerivedData \
-resultBundlePath tests.xcresult \
-enableCodeCoverage YES \
test
1 change: 1 addition & 0 deletions platforms/ios/example/ios-ui-test-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ xcodebuild \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 15,OS=17.2' \
-derivedDataPath ./DerivedData \
-resultBundlePath ui-tests.xcresult \
-enableCodeCoverage YES \
test

0 comments on commit cd36f59

Please sign in to comment.