Skip to content

Commit 0e646a2

Browse files
authored
ci: try codecov action (#261)
* Try codecov action * Fix ci * fix watchOS * Use lcov format * Use original for iOS * Update filename * Use old codecov for iOS * don't fail
1 parent 2bda2fd commit 0e646a2

File tree

1 file changed

+25
-19
lines changed

1 file changed

+25
-19
lines changed

.github/workflows/ci.yml

+25-19
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,17 @@ jobs:
5151
env:
5252
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
5353
- name: Prepare codecov
54-
run: |
55-
XCTEST=$(find DerivedData -type f -name 'ParseSwiftTestsmacOS')
56-
PROFDATA=$(find DerivedData -type f -name '*.profdata')
57-
xcrun llvm-cov export "${XCTEST}" -format="lcov" -instr-profile "${PROFDATA}" > info.lcov
54+
uses: sersoft-gmbh/swift-coverage-action@v2
55+
id: coverage-files
56+
with:
57+
format: lcov
58+
search-paths: ./DerivedData
5859
env:
5960
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
6061
- name: Upload coverage to Codecov
6162
uses: codecov/codecov-action@v2
6263
with:
64+
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
6365
env_vars: MACOS
6466
env:
6567
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
@@ -73,15 +75,17 @@ jobs:
7375
env:
7476
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
7577
- name: Prepare codecov
76-
run: |
77-
XCTEST=$(find DerivedData -type f -name 'ParseSwiftTeststvOS')
78-
PROFDATA=$(find DerivedData -type f -name '*.profdata')
79-
xcrun llvm-cov export "${XCTEST}" -format="lcov" -instr-profile "${PROFDATA}" > info.lcov
78+
uses: sersoft-gmbh/swift-coverage-action@v2
79+
id: coverage-files
80+
with:
81+
format: lcov
82+
search-paths: ./DerivedData
8083
env:
8184
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
8285
- name: Upload coverage to Codecov
8386
uses: codecov/codecov-action@v2
8487
with:
88+
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
8589
env_vars: TVOS
8690
env:
8791
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
@@ -120,15 +124,17 @@ jobs:
120124
env:
121125
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
122126
- name: Prepare codecov
123-
run: |
124-
XCTEST=$(find .build -type f -name 'ParseSwiftPackageTests')
125-
PROFDATA=$(find .build -type f -name '*.profdata')
126-
xcrun llvm-cov export "${XCTEST}" -format="lcov" -instr-profile "${PROFDATA}" > info_spm.lcov
127+
uses: sersoft-gmbh/swift-coverage-action@v2
128+
id: coverage-files
129+
with:
130+
format: lcov
131+
search-paths: ./.build
127132
env:
128133
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
129134
- name: Upload coverage to Codecov
130135
uses: codecov/codecov-action@v2
131136
with:
137+
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
132138
env_vars: SPM
133139
fail_ci_if_error: true
134140
env:
@@ -154,19 +160,19 @@ jobs:
154160
env:
155161
DEVELOPER_DIR: ${{ env.CI_XCODE_VER }}
156162
- name: Prepare codecov
157-
run: |
158-
XCTEST=$(find .build -type f -name 'ParseSwiftPackageTests')
159-
PROFDATA=$(find .build -type f -name '*.profdata')
160-
xcrun llvm-cov export "${XCTEST}" -format="lcov" -instr-profile "${PROFDATA}" > info_spm_5_2.lcov
161-
env:
162-
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
163+
uses: sersoft-gmbh/swift-coverage-action@v2
164+
id: coverage-files
165+
with:
166+
format: lcov
167+
search-paths: ./.build
163168
- name: Upload coverage to Codecov
164169
uses: codecov/codecov-action@v2
165170
with:
171+
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
166172
env_vars: SPM5_2
167173
fail_ci_if_error: true
168174
env:
169-
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
175+
DEVELOPER_DIR: ${{ env.CI_XCODE_VER }}
170176

171177
linux:
172178
runs-on: ubuntu-18.04

0 commit comments

Comments
 (0)