[github/ci] disable codecov when pull request
@@ -19,9 +19,12 @@ jobs:
override: true
- name: Install grcov
+ if: >
+ github.ref == 'refs/heads/master'
uses: actions-rs/install@v0.1
with:
crate: grcov
+ version: latest
use-tool-cache: true
- name: Run test
@@ -35,11 +38,15 @@ jobs:
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests'
- - name: Run test
+ - name: Run code coverage
+ if: >
+ github.ref == 'refs/heads/master'
uses: actions-rs/grcov@v0.1.5
id: coverage
- name: Upload to codecov.io
+ if: >
+ github.ref == 'refs/heads/master'
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
