Skip to content

Commit

Permalink
Update MSVR in README.md (#356)
Browse files Browse the repository at this point in the history
* Update README.md

Update MSVR in `README.md`

* Add `rust-version` in `Cargo.toml` and CI

* Forgot tests
  • Loading branch information
fabienbellanger authored Nov 12, 2024
1 parent 2f24331 commit 0517e59
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ jobs:
test_validator:
name: Continuous integration
runs-on: ubuntu-latest
strategy:
matrix:
include:
- rust: 1.81.0 # MSRV, sometimes it changes because of compiler test issues
- rust: stable
steps:
- uses: actions/checkout@v3
- name: Extract Rust version from Cargo.toml
run: |
MSRV=$(sed -n 's/^rust-version = "\([^"]*\)"/\1/p' Cargo.toml)
echo "rust-version: $MSRV"
echo "MSRV=$MSRV" >> $GITHUB_ENV
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@stable # actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
toolchain: ${{ env.MSRV }}
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Build System Info
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[workspace]
resolver = "2"
members = ["validator", "validator_derive", "validator_derive_tests"]

[workspace.package]
rust-version = "1.81"
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
Macros 1.1 custom derive to simplify struct validation inspired by [marshmallow](http://marshmallow.readthedocs.io/en/latest/) and
[Django validators](https://docs.djangoproject.com/en/1.10/ref/validators/).

The minimum supported version is Rust 1.70.

Installation:

```toml
Expand Down Expand Up @@ -402,4 +400,4 @@ For example, the following attributes all work:

## Features
`derive` - This allows for the use of the derive macro.
`derive_nightly_features` - This imports both derive as well as proc-macro-error2 nightly features. This allows proc-macro-error2 to emit extra nightly warnings.
`derive_nightly_features` - This imports both derive as well as proc-macro-error2 nightly features. This allows proc-macro-error2 to emit extra nightly warnings.
1 change: 1 addition & 0 deletions validator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ repository = "https://github.com/Keats/validator"
keywords = ["validation", "api", "validator"]
edition = "2021"
readme = "../README.md"
rust-version = { workspace = true }

[dependencies]
url = "2"
Expand Down
1 change: 1 addition & 0 deletions validator_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ repository = "https://github.com/Keats/validator"
keywords = ["validation", "api", "validator"]
edition = "2021"
readme = "../README.md"
rust-version = { workspace = true }

[lib]
proc-macro = true
Expand Down
1 change: 1 addition & 0 deletions validator_derive_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "validator_derive_tests"
version = "0.1.0"
authors = ["Vincent Prouillet <[email protected]>"]
edition = "2021"
rust-version = { workspace = true }

[features]
default = ["test_ui"]
Expand Down

0 comments on commit 0517e59

Please sign in to comment.