Skip to content

Merge pull request #62 from kitsuyui/renovate/reqwest-0.x #136

Merge pull request #62 from kitsuyui/renovate/reqwest-0.x

Merge pull request #62 from kitsuyui/renovate/reqwest-0.x #136

Workflow file for this run

name: tests
on:
# pull-request events are not triggered when a PR is merged
# push events are not triggered when a PR created from a fork repository
# So we need both to run tests on every PR and after merging
pull_request:
push:
branches:
- main
jobs:
tests:
name: tests
runs-on: ubuntu-latest
env:
# For incremental builds
CARGO_INCREMENTAL: 1
steps:
- uses: actions/checkout@v4
# For incremental builds
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
# For incremental builds
- name: git-restore-mtime
uses: chetan/git-restore-mtime-action@v2.0
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets --all-features -- -D warnings
- run: cargo check
- name: coverage
run: |
cargo install cargo-llvm-cov || true # when already cached
cargo llvm-cov --lcov --output-path coverage.lcov
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.lcov
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
verbose: true