|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: Coverage |
| 19 | + |
| 20 | +# Trigger only on pushes to master, not pull requests |
| 21 | +on: |
| 22 | + push: |
| 23 | + branches: |
| 24 | + - master |
| 25 | + |
| 26 | +jobs: |
| 27 | + |
| 28 | + coverage: |
| 29 | + name: Coverage |
| 30 | + runs-on: ubuntu-latest |
| 31 | + strategy: |
| 32 | + matrix: |
| 33 | + arch: [ amd64 ] |
| 34 | + rust: [ stable ] |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@v2 |
| 37 | + with: |
| 38 | + submodules: true |
| 39 | + - name: Setup Rust toolchain |
| 40 | + run: | |
| 41 | + rustup toolchain install ${{ matrix.rust }} |
| 42 | + rustup default ${{ matrix.rust }} |
| 43 | + - name: Cache Cargo |
| 44 | + uses: actions/cache@v3 |
| 45 | + with: |
| 46 | + path: /home/runner/.cargo |
| 47 | + key: cargo-coverage-cache3- |
| 48 | + - name: Run coverage |
| 49 | + run: | |
| 50 | + rustup toolchain install stable |
| 51 | + rustup default stable |
| 52 | + cargo install --version 0.18.2 cargo-tarpaulin |
| 53 | + cargo tarpaulin --all --out Xml |
| 54 | + - name: Report coverage |
| 55 | + continue-on-error: true |
| 56 | + run: bash <(curl -s https://codecov.io/bash) |
0 commit comments