Skip to content

Commit

Permalink
Merge 17f42d8 into 0142e10
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonbrad committed Apr 28, 2023
2 parents 0142e10 + 17f42d8 commit 972d6c6
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Coverage

on:
workflow_dispatch:
push:
branches: [main, release-*]
pull_request:
branches: [main, release-*]

env:
CARGO_TERM_COLOR: always

jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- run: rustup component add llvm-tools-preview
- name: Install grcov
uses: actions-rs/install@v0.1
with:
crate: grcov
version: latest
use-tool-cache: true
- name: build
env:
RUSTFLAGS: -Cinstrument-coverage
run: cargo build --verbose
- name: test
env:
RUSTFLAGS: -Cinstrument-coverage
LLVM_PROFILE_FILE: clafrica-%p-%m.profraw
run: cargo test --all-features --verbose
- name: Run grcov
run: |
mkdir coverage
grcov . \
--binary-path ./target/debug/ \
-s . \
-t lcov \
--branch \
--ignore-not-existing \
--ignore "/*" \
--excl-line "#\\[derive\\(" \
-o ./coverage/lcov.info
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
59 changes: 59 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Rust

on:
workflow_dispatch:
push:
branches: [main, release-*]
pull_request:
branches: [main, release-*]

env:
CARGO_TERM_COLOR: always

jobs:
clippy_workspace:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add clippy
uses: actions-rs/toolchain@v1.0.6
with:
profile: minimal
default: true
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets -- -D warnings

rust_fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add rustfmt
uses: actions-rs/toolchain@v1.0.6
with:
profile: minimal
default: true
components: rustfmt
- uses: Swatinem/rust-cache@v2
- run: |
cargo fmt -- --check
rust_build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: cargo build --all-features --verbose

run_tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: |
cargo test --all-features --lib --bins --tests --verbose
cargo test --benches
1 change: 1 addition & 0 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.68

0 comments on commit 972d6c6

Please sign in to comment.