Fix. #886
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 | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: -Cinstrument-coverage | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.2.2" | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
toolchain: nightly | |
- run: | | |
cargo install grcov cargo-nextest | |
rustup component add llvm-tools-preview | |
- name: Build | |
run: cargo build | |
- name: chdir | |
run: cd monoruby | |
- name: Run tests | |
run: LLVM_PROFILE_FILE="monoruby-%p-%m.profraw" cargo nextest run | |
- name: Run tests | |
run: LLVM_PROFILE_FILE="monoruby-bin-%p-%m.profraw" cargo run -- test.rb | |
- name: Run tests | |
run: LLVM_PROFILE_FILE="monoruby-stdin-%p-%m.profraw" cargo run < test.rb | |
- name: Run tests | |
run: LLVM_PROFILE_FILE="monoruby-e-%p-%m.profraw" cargo run -- -e "" | |
- name: Run grcov | |
run: grcov . -s . --binary-path ./target/debug/ -t lcov --branch --ignore-not-existing -o ./lcov.info | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |