Skip to content
Open
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
25 changes: 20 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,23 @@ jobs:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- &install-rust
name: Install rust
uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9
with:
override: true
components: rustfmt, clippy
- &cache-cargo
name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target/${{ env.BUILD_PROFILE }}
key: ${{ runner.os }}-cargo-${{ env.BUILD_PROFILE }}-${{ hashFiles('rust-toolchain.toml', '**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ env.BUILD_PROFILE }}-
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libpq-dev
- name: Export POSTGRES_TEST_URL
Expand All @@ -38,7 +54,7 @@ jobs:
with:
url: postgres://postgres:password@localhost/test
- name: Format
run: rustup component add rustfmt --toolchain nightly-2025-06-10 && cargo +nightly-2025-06-10 fmt --all -- --check
run: cargo fmt --all -- --check
- name: Lint
run: cargo clippy --no-default-features --features ${{ matrix.feature }} -- -D warnings
- name: Test
Expand All @@ -65,9 +81,8 @@ jobs:
CODESCENE_CLI_SHA256: "a1c38415c5978908283c0608b648b27e954c93882b15d8b91d052d846c3eabd8"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- *install-rust
- *cache-cargo
- uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ This repository is written in Rust and uses Cargo for building and dependency
management. Contributors should follow these best practices when working on the
project:

- Run `cargo +nightly-2025-06-10 fmt --all` after making any change, and run
- Run `cargo fmt --all` after making any change, and run
`cargo clippy -- -D warnings` and
`RUSTFLAGS="-D warnings" cargo test` before committing.
- Clippy warnings MUST be disallowed.
Expand Down
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 = "nightly-2025-06-10"
components = ["rustfmt", "clippy"]
2 changes: 1 addition & 1 deletion test-util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ impl Drop for PostgresTestDb {
///
/// ```rust
/// use rstest::rstest;
/// use test_util::{postgres_db, PostgresTestDb};
/// use test_util::{PostgresTestDb, postgres_db};
///
/// #[rstest]
/// fn my_test(postgres_db: PostgresTestDb) {
Expand Down