Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,33 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust (stable)
uses: dtolnay/rust-toolchain@stable

- name: Cache Cargo
uses: Swatinem/rust-cache@v2
# Force correct Rust version
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.81.0
components: rustfmt, clippy
override: true

# Verify rustc version
- name: Check rustc version
run: rustc --version

- name: Cache Cargo registry & target
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-cache-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}

- name: Format check
run: cargo fmt --all -- --check

- name: Clippy (deny warnings)
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Unit tests
- name: Run tests
run: cargo test --all --all-features --verbose
29 changes: 29 additions & 0 deletions .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: MSRV

on:
push:
branches:
- master
tags:
- "*"
pull_request:

jobs:
msrv:
name: Check MSRV
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust (MSRV)
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.80.1 # ← choose your MSRV

- name: Cargo check
run: cargo check --all-features

- name: Cargo test
run: cargo test --all-features
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ documentation = "http://manute.github.io/rawsql/rawsql/index.html"
readme = "README.md"
keywords = ["database", "sql"]


[lib]
name = "rawsql"
path = "src/lib.rs"
doctest = false

[dev-dependencies]
postgres = "0.19.2"
postgres = "0.19.12"
3 changes: 3 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
channel = "1.81.0"
components = ["rustfmt", "clippy"]
Loading