Skip to content

Commit 836427b

Browse files
authored
upload tarpaulin report to coverall (#754)
1 parent 6fdab6b commit 836427b

File tree

1 file changed

+6
-27
lines changed

1 file changed

+6
-27
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -267,35 +267,14 @@ jobs:
267267
path: ~/.cargo/registry/cache
268268
key: cargo-deps-v2-${{ hashFiles('Cargo.lock') }}
269269

270-
- name: Run tarpaulin
270+
- name: Run cargo-tarpaulin
271271
uses: actions-rs/[email protected]
272272
with:
273-
out-type: Html
273+
args: '--ignore-tests --out Lcov'
274274
timeout: 600
275275

276-
- name: Set branch name
277-
if: ${{ github.event_name == 'pull_request' }}
278-
run: echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
279-
shell: bash
280-
281-
- name: Set branch name
282-
if: ${{ github.event_name == 'push' }}
283-
run: echo "BRANCH_NAME=$(echo $GITHUB_REF | cut -d '/' -f 3)" >> $GITHUB_ENV
284-
shell: bash
285-
286-
- name: Construct reference slug
287-
run: |
288-
TIME=$(TZ=UTC git show --quiet --date='format-local:%Y%m%dT%H%M%SZ' --format="%cd")
289-
SHA=${GITHUB_SHA:0:8}
290-
SLUG=$(echo ${BRANCH_NAME}_${TIME}_${SHA} | sed -r 's/[^[:alnum:]_-]/-/g')
291-
echo "SLUG=$SLUG" >> $GITHUB_ENV
292-
shell: bash
293-
294-
- name: Rename coverage report
295-
run: mv tarpaulin-report.html test_coverage_${{ env.SLUG }}.html
296-
297-
- name: Upload coverage report
298-
uses: actions/upload-artifact@v2
276+
- name: upload to Coveralls
277+
uses: coverallsapp/github-action@master
299278
with:
300-
name: test_coverage_${{ env.SLUG }}
301-
path: test_coverage_${{ env.SLUG }}.html
279+
github-token: ${{ secrets.GITHUB_TOKEN }}
280+
path-to-lcov: './lcov.info'

0 commit comments

Comments
 (0)