| 1 | name: CI |
| 2 | |
| 3 | on: |
| 4 | pull_request: |
| 5 | types: [opened, synchronize, reopened] |
| 6 | push: |
| 7 | branches: |
| 8 | - main |
| 9 | |
| 10 | jobs: |
| 11 | ci: |
| 12 | name: CI (stable) |
| 13 | runs-on: ubuntu-latest |
| 14 | |
| 15 | steps: |
| 16 | - uses: actions/checkout@v3 |
| 17 | |
| 18 | - name: Install Rust Stable |
| 19 | run: | |
| 20 | rustup override set stable |
| 21 | rustup update stable |
| 22 | rustup component add llvm-tools-preview |
| 23 | |
| 24 | - name: Install cargo-llvm-cov |
| 25 | uses: taiki-e/install-action@cargo-llvm-cov |
| 26 | |
| 27 | - name: Test and Generate code coverage |
| 28 | run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info |
| 29 | - name: Upload coverage to Codecov |
| 30 | uses: codecov/codecov-action@v3 |
| 31 | with: |
| 32 | files: lcov.info |
| 33 | fail_ci_if_error: true |