diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f75adda..09c45c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,32 +11,44 @@ env: CARGO_TERM_COLOR: always RUST_LOG: info RUST_BACKTRACE: 1 + RUSTFLAGS: "-Dwarnings" CI: true jobs: - ci: + code-quality: + name: Code Quality runs-on: ubuntu-latest steps: - - name: Checkout code + - name: ๐Ÿ“ฅ Checkout code uses: actions/checkout@v4 - - name: Install toolchain + - name: ๐Ÿ› ๏ธ Install Rust toolchain uses: moonrepo/setup-rust@v1 with: - components: clippy,rustfmt - cache-base: main - bins: cargo-tarpaulin - - - name: Check formatting + components: clippy,rustfmt + + - name: ๐ŸŽจ Check formatting run: cargo fmt --all --check - - name: Run Clippy + - name: ๐Ÿ” Run Clippy run: cargo clippy - - name: Run Build - run: cargo build + build-and-test: + name: Build and Test + runs-on: ubuntu-latest + steps: + - name: ๐Ÿ“ฅ Checkout code + uses: actions/checkout@v4 + + - name: ๐Ÿ› ๏ธ Install Rust toolchain + uses: moonrepo/setup-rust@v1 + with: + bins: cargo-tarpaulin + + - name: ๐Ÿ—๏ธ Build + run: cargo build --release - - name: Run tests with coverage + - name: ๐Ÿงช Run tests with coverage run: | cargo tarpaulin --all-features --workspace --out xml diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..1d0fd56 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,5 @@ +[toolchain] +# The default profile includes rustc, rust-std, cargo, rust-docs, rustfmt and clippy. +# https://rust-lang.github.io/rustup/concepts/profiles.html +profile = "default" +channel = "1.80"