Skip to content

Commit 96e0644

Browse files
committed
Update README.md
1 parent b825f77 commit 96e0644

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

README.md

+30-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Test
1919
uses: actions/checkout@v1
2020
- run: swift test --enable-code-coverage
21-
- uses: ./.github/actions/lcov
21+
- uses: michaelhenry/[email protected]
2222
with:
2323
build-path: .build
2424
target: GithubChecksPackageTests.xctest
@@ -39,7 +39,7 @@ jobs:
3939
runs-on: macos-latest
4040
steps:
4141
- uses: actions/checkout@v1
42-
- run: xcodebuild test -project App.xcodeproj -scheme App -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone X,OS=13.0' -enableCodeCoverage YES
42+
- run: xcodebuild test -project App.xcodeproj -scheme App -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone X,OS=13.0' -enableCodeCoverage YES -derivedDataPath DerivedData
4343
- uses: michaelhenry/[email protected]
4444
with:
4545
build-path: DerivedData
@@ -55,3 +55,31 @@ jobs:
5555
```
5656
5757
> For some reason even though the code-coverage was generate from the same llvm version, codeclimate is returning an error " ./cc-test-reporter: cannot execute binary file: Exec format error" when using an ubuntu machine.
58+
59+
## Note
60+
61+
If your project is an SPM project, please use the `.xctest` file as `target` which was generated from `swift test --enable-code-coverage` and set the `is-spm` to `true`.
62+
63+
Eg.
64+
65+
```yml
66+
- run: swift test --enable-code-coverage
67+
- uses: michaelhenry/[email protected]
68+
with:
69+
build-path: .build
70+
target: AppTests.xctest
71+
is-spm: true
72+
```
73+
74+
Otherwise, if your project is an ios/macos that uses the `xcodebuild test` to test, please use the `.app` as `target` which was the file generated from the `xcodebuild test -enableCodeCoverage YES` and set the `is-spm` to `false`.
75+
76+
Eg.
77+
78+
```yml
79+
- run: xcodebuild test -project App.xcodeproj -scheme App -configuration Debug -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone X,OS=13.0' -enableCodeCoverage YES -derivedDataPath DerivedData
80+
- uses: michaelhenry/[email protected]
81+
with:
82+
build-path: DerivedData
83+
target: App.app
84+
is-spm: false
85+
```

0 commit comments

Comments
 (0)