Skip to content

Commit

Permalink
chore: skip coverage (#95)
Browse files Browse the repository at this point in the history
* 🤔

* 🤔

* feat: replace actions-rs

* chore: use dtolnay rust-toolchain

* chore: fmt

* chore: collect coverage

* chore: thinking about

* chore: thinking about

* chore: thinking about

* chore: thinking about

* fix: skip collect coverage
  • Loading branch information
9renpoto authored Jun 18, 2023
1 parent a5e9471 commit f0455b4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 25 deletions.
37 changes: 21 additions & 16 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,36 @@ env:

jobs:
test:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
override: true
- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
out-type: Lcov
- name: Coveralls upload
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: lcov.info
clippy_check:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
- run: cargo test --workspace --all-features --all-targets
# - run: cargo install grcov
# - run: grcov . --binary-path ./target/debug/ -s . --keep-only 'src/*'
# - name: Coveralls upload
# uses: coverallsapp/[email protected]
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- uses: actions-rs/[email protected]
- name: rustup toolchain install
uses: dtolnay/rust-toolchain@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Check
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: rustfmt
run: cargo fmt --all --check
18 changes: 9 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ fn main() {
}

pub fn prints_and_returns_10(a: i32) -> i32 {
//{}という値を得た
println!("I got the value {}", a);
10
//{}という値を得た
println!("I got the value {}", a);
10
}

#[cfg(test)]
mod tests {
use super::*;
use super::*;

#[test]
fn this_test_will_pass() {
let value = prints_and_returns_10(4);
assert_eq!(10, value);
}
#[test]
fn this_test_will_pass() {
let value = prints_and_returns_10(4);
assert_eq!(10, value);
}
}

0 comments on commit f0455b4

Please sign in to comment.