Skip to content

chore: cleanup ci and add more checks. Remove Cargo.lock file #11

chore: cleanup ci and add more checks. Remove Cargo.lock file

chore: cleanup ci and add more checks. Remove Cargo.lock file #11

Workflow file for this run

on:
push:
branches:
- main
pull_request:
branches:
- main
name: ci
env:
RUST_BACKTRACE: 1
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install rust toolchain
id: toolchain
run: |
rustup toolchain install stable
rustup override set stable
rustup toolchain install stable
- name: Run cargo fmt
run: |
cargo fmt -- --check
clippy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- toolchain: stable
# fail on stable warnings
args: "-D warnings"
- toolchain: beta
steps:
- uses: actions/checkout@v4
- name: Install rust toolchain
id: toolchain
run: |
rustup toolchain install ${{ matrix.toolchain }} --profile minimal --component clippy
rustup override set ${{ matrix.toolchain }}
- name: Run cargo clippy
run: |
cargo clippy --all-features --all-targets --workspace -- ${{ matrix.args }}
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
rust: [stable]
os: [ubuntu-latest]
env: [default]
steps:
- uses: actions/checkout@v4
- name: Install rust toolchain
id: toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup override set ${{ matrix.rust }}
rustup toolchain install ${{ matrix.rust }}
- name: Run cargo test
run: |
cargo test