diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..75dbd3b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: test suite +on: [push, pull_request] + +jobs: + test: + name: build check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - name: Cache rust build artifacts + uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }} + restore-keys: | + ${{ runner.os }}-cargo- + - name: cargo test + run: cargo test --all-features + - name: Clippy check + run: cargo clippy --all-targets + - name: Format check + run: cargo fmt --check