mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-04-25 17:49:58 -04:00
53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
name: Code coverage
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
code_coverage:
|
|
name: Code Coverage
|
|
runs-on: "ubuntu-latest"
|
|
if: github.event_name == 'push' || !github.event.pull_request.draft
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Load cache
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Install tarpaulin
|
|
uses: taiki-e/install-action@v2
|
|
with:
|
|
tool: cargo-tarpaulin
|
|
|
|
# set up backend for integration tests
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.8
|
|
|
|
- uses: gnunicorn/setup-matrix-synapse@main
|
|
with:
|
|
uploadLogs: true
|
|
httpPort: 8228
|
|
disableRateLimiting: true
|
|
serverName: "matrix-sdk.rs"
|
|
|
|
- name: Run tarpaulin
|
|
run: |
|
|
cargo tarpaulin --out Xml -e sliding-sync-integration-test
|
|
|
|
- name: Upload to codecov.io
|
|
uses: codecov/codecov-action@v3
|