Merge pull request #82 from YogiPristiawan/go/ucfirst #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust PR Check | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
paths: ["rust/**"] | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./rust | |
env: | |
CARGO_TERM_COLOR: always | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
components: clippy, llvm-tools-preview | |
- name: Check using Clippy | |
run: cargo clippy -- -D warnings | |
- name: Build | |
run: cargo build --verbose | |
- name: Test | |
env: | |
LLVM_PROFILE_FILE: grcov-%p-%m.profraw | |
RUSTFLAGS: -C instrument-coverage | |
run: cargo test | |
- name: Install grcov | |
run: cargo install grcov | |
- name: Generate coverage | |
run: | | |
grcov $(find . -name "grcov-*.profraw" -print) \ | |
--branch \ | |
--ignore-not-existing \ | |
--binary-path ./target/debug/ \ | |
-s . \ | |
-t lcov \ | |
--ignore "/*" \ | |
-o lcov.info | |
- name: Report coverage | |
uses: codecov/codecov-action@v2 | |
with: | |
flags: rust |