A code coverage step
This commit is contained in:
parent
976bbff0b9
commit
69c0c3e9fd
|
|
@ -8,16 +8,38 @@ jobs:
|
||||||
name: Google Cloud Build
|
name: Google Cloud Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
|
|
||||||
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
|
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
|
||||||
with:
|
with:
|
||||||
version: '275.0.0'
|
version: '275.0.0'
|
||||||
service_account_key: ${{ secrets.GCLOUD_AUTH }}
|
service_account_key: ${{ secrets.GCLOUD_AUTH }}
|
||||||
|
|
||||||
- name: Build, Test, Push to GCR
|
- name: Build, Test, Push to GCR
|
||||||
run: |
|
run: |
|
||||||
BRANCH_NAME=$GITHUB_REPOSITORY/$(expr $GITHUB_REF : '.*/\(.*\)') && \
|
BRANCH_NAME=$GITHUB_REPOSITORY/$(expr $GITHUB_REF : '.*/\(.*\)') && \
|
||||||
BRANCH_NAME=${BRANCH_NAME,,} && \
|
BRANCH_NAME=${BRANCH_NAME,,} && \
|
||||||
gcloud builds submit . --config cloudbuild.yaml --project zealous-zebra --substitutions BRANCH_NAME=$BRANCH_NAME
|
gcloud builds submit . --config cloudbuild.yaml --project zealous-zebra --substitutions BRANCH_NAME=$BRANCH_NAME
|
||||||
|
|
||||||
|
|
||||||
|
codecov:
|
||||||
|
name: Code Coverage
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
- name: Install cargo-tarpaulin
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: install
|
||||||
|
args: cargo-tarpaulin
|
||||||
|
- name: Generate coverage report
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: tarpaulin
|
||||||
|
args: --release --timeout 180 --out Xml
|
||||||
|
# - name: Upload coverage to Codecov
|
||||||
|
# uses: codecov/codecov-action@v1.0.3
|
||||||
|
# with:
|
||||||
|
# token: ${{secrets.CODECOV_TOKEN}}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue