Skip to content
Draft
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
79 changes: 22 additions & 57 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,44 +23,17 @@ on:
env:
RUST_LOG: debug
CARGO_TERM_COLOR: always
MSRV: 1.81.0
HACK: hack --package neo4rs --each-feature --exclude-features unstable-serde-packstream-format,unstable-bolt-protocol-impl-v2,unstable-result-summary
MSRV: 1.85.0
HACK_OPTS: --each-feature --exclude-features unstable-serde-packstream-format,unstable-bolt-protocol-impl-v2,unstable-result-summary

jobs:
check:
name: Compile on MSRV
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}

- name: Set up Rust cache
uses: Swatinem/rust-cache@v2

- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack

- name: Prepare MSRV lockfile
run: cp ci/Cargo.lock.msrv Cargo.lock

- name: Run cargo check
run: cargo +$MSRV --locked ${{ env.HACK }} check

fmt:
name: Check formatting
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 2

Expand All @@ -82,7 +55,7 @@ jobs:
steps:

- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 2

Expand All @@ -102,7 +75,7 @@ jobs:
run: cp ci/Cargo.lock.msrv Cargo.lock

- name: Run clippy
run: cargo +$MSRV --locked ${{ env.HACK }} clippy -- -D warnings
run: cargo +${{ env.MSRV }} --locked hack --package neo4rs ${{ env.HACK_OPTS }} clippy -- -D warnings

unit-tests:
name: Run unit tests
Expand All @@ -114,14 +87,14 @@ jobs:
steps:

- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 2

- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
toolchain: ${{ env.MSRV }}

- name: Set up Rust cache
uses: Swatinem/rust-cache@v2
Expand All @@ -132,8 +105,11 @@ jobs:
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest

- name: Prepare MSRV lockfile
run: cp ci/Cargo.lock.msrv Cargo.lock

- name: Run unit tests
run: cargo ${{ env.HACK }} nextest run --lib
run: cargo +${{ env.MSRV }} --locked hack --package neo4rs ${{ env.HACK_OPTS }} nextest run --lib

integration-tests:
name: Run integration tests
Expand All @@ -158,14 +134,14 @@ jobs:
steps:

- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 2

- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}
toolchain: stable

- name: Set up Rust cache
uses: Swatinem/rust-cache@v2
Expand All @@ -176,22 +152,11 @@ jobs:
- name: Install cargo-nextest
uses: taiki-e/install-action@nextest

- name: Prepare MSRV lockfile
run: cp ci/Cargo.lock.msrv Cargo.lock

- name: Run integration tests
run: cargo +$MSRV --locked ${{ env.HACK }} nextest run -E 'kind(test)'
run: cargo hack ${{ env.HACK_OPTS }} nextest --manifest-path './integrationtests/Cargo.toml' run -E 'kind(test)'

msrv:
name: Validate MSRV and minimal dependency versions
strategy:
fail-fast: false
matrix:
include:
- file: Cargo.lock.msrv
name: MSRV
- file: Cargo.lock.min
name: minimal dependency versions
min_dep:
name: Validate minimal dependency versions
runs-on: ubuntu-latest
steps:

Expand All @@ -203,21 +168,21 @@ jobs:
with:
toolchain: ${{ env.MSRV }}

- name: Prepare ${{ matrix.name }} lockfile
run: cp ci/${{ matrix.file }} Cargo.lock

- name: Set up Rust cache
uses: Swatinem/rust-cache@v2

- name: Install cargo-nextest
uses: taiki-e/install-action@nextest

- name: Run ${{ matrix.name }} unit tests
run: cargo +$MSRV nextest run --lib --all-features --locked
- name: Prepare minimal dependency versions lockfile
run: cp ci/Cargo.lock.min Cargo.lock

- name: Run minimal dependency versions unit tests
run: cargo +${{ env.MSRV }} nextest run --package neo4rs --lib --all-features --locked

release:
name: Release
needs: [ check, fmt, clippy, unit-tests, integration-tests, msrv ]
needs: [ fmt, clippy, unit-tests, integration-tests, min_dep ]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:

env:
RUSTUP_TOOLCHAIN: stable
MSRV: 1.81.0
MSRV: 1.85.0

jobs:
make-release-pr:
Expand All @@ -32,7 +32,7 @@ jobs:
steps:

- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 2

Expand Down
6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
[workspace]
resolver = "2"

members = [
"lib",
"macros",
"xtask",
]
members = ["lib", "macros", "include_snippet", "xtask"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Only the latest 5.x version is supported, following the [Neo4j Version support p

## MSRV

The crate has a minimum supported Rust version (MSRV) of `1.81.0` as of 0.9.x.
The crate has a minimum supported Rust version (MSRV) of `1.85.0` as of 0.9.x.
The version [0.8.x](https://crates.io/crates/neo4rs/0.8.0) has an MSRV of `1.63.0`

A change in the MSRV is *not* considered a breaking change.
Expand Down
Loading
Loading