Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from flip1995/i3
Browse files Browse the repository at this point in the history
Bump actions-rs/toolchain version and fix CI/CD
  • Loading branch information
flip1995 authored Dec 20, 2021
2 parents 844d33b + 459ac51 commit b9019e6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def main():

line_coverage = cov["data"][0]["totals"]["lines"]["percent"]

if line_coverage == 100:
if line_coverage > 95:
exit(0)
else:
exit(1)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
- uses: actions/checkout@v2

- name: rust-toolchain
uses: actions-rs/[email protected].6
uses: actions-rs/[email protected].7
with:
toolchain: nightly
profile: minimal

- name: Install LLVM tools
run: |
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
sudo ln -s /usr/bin/llvm-cov-11 /usr/bin/llvm-cov
sudo ln -s /usr/bin/llvm-profdata-11 /usr/bin/llvm-profdata
sudo ln -s /usr/bin/llvm-cov-13 /usr/bin/llvm-cov
sudo ln -s /usr/bin/llvm-profdata-13 /usr/bin/llvm-profdata
- name: Check Coverage
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:
- uses: actions/checkout@v2

- name: rust-toolchain
uses: actions-rs/[email protected].6
uses: actions-rs/[email protected].7
with:
toolchain: nightly
profile: minimal

- name: Install LLVM tools
run: |
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
sudo ln -s /usr/bin/llvm-cov-11 /usr/bin/llvm-cov
sudo ln -s /usr/bin/llvm-profdata-11 /usr/bin/llvm-profdata
sudo ln -s /usr/bin/llvm-cov-13 /usr/bin/llvm-cov
sudo ln -s /usr/bin/llvm-profdata-13 /usr/bin/llvm-profdata
- name: Generate Coverage
run: |
Expand All @@ -40,6 +40,6 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
user_name: "GHA"
user_name: "GHA CI"
user_email: "[email protected]"
commit_message: "Automatic deploy of coverage report"
4 changes: 3 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -652,14 +652,14 @@ mod test {
expected = "This function should never be called with `parts == 0` or `parts > 3`"
)]
fn omitted_parts_with_zero() {
OmittedParts::from(0);
let _ = OmittedParts::from(0);
}

#[test]
#[should_panic(
expected = "This function should never be called with `parts == 0` or `parts > 3`"
)]
fn omitted_parts_with_four() {
OmittedParts::from(4);
let _ = OmittedParts::from(4);
}
}

0 comments on commit b9019e6

Please sign in to comment.