mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-28 00:00:20 +02:00
Use minimal dependency versions for MSRV tests on CI (#1109)
This commit is contained in:
@@ -2,6 +2,7 @@ name: CI
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
MSRV: 1.56.0
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -88,8 +89,8 @@ jobs:
|
|||||||
command: test
|
command: test
|
||||||
args: --all --all-features --all-targets
|
args: --all --all-features --all-targets
|
||||||
|
|
||||||
# some examples doesn't support 1.56 (such as async-graphql)
|
# some examples doesn't support our MSRV (such as async-graphql)
|
||||||
# so we only test axum itself on 1.56
|
# so we only test axum itself on our MSRV
|
||||||
test-msrv:
|
test-msrv:
|
||||||
needs: check
|
needs: check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -97,10 +98,21 @@ jobs:
|
|||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.56
|
toolchain: ${{ env.MSRV }}
|
||||||
override: true
|
override: true
|
||||||
profile: minimal
|
profile: minimal
|
||||||
|
- name: "install Rust nightly"
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: nightly
|
||||||
|
profile: minimal
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
- name: Select minimal versions
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: update
|
||||||
|
args: -Z minimal-versions
|
||||||
|
toolchain: nightly
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
@@ -109,8 +121,12 @@ jobs:
|
|||||||
-p axum
|
-p axum
|
||||||
-p axum-extra
|
-p axum-extra
|
||||||
-p axum-core
|
-p axum-core
|
||||||
--all-features --all-targets
|
-p internal-minimal-versions
|
||||||
# the compiler errors are different on 1.56 which makes
|
--all-features
|
||||||
|
--all-targets
|
||||||
|
--locked
|
||||||
|
toolchain: ${{ env.MSRV }}
|
||||||
|
# the compiler errors are different on our MSRV which makes
|
||||||
# the trybuild tests in axum-macros fail, so just run the doc
|
# the trybuild tests in axum-macros fail, so just run the doc
|
||||||
# tests
|
# tests
|
||||||
- name: Run axum-macros doc tests
|
- name: Run axum-macros doc tests
|
||||||
@@ -119,8 +135,11 @@ jobs:
|
|||||||
command: test
|
command: test
|
||||||
args: >
|
args: >
|
||||||
-p axum-macros
|
-p axum-macros
|
||||||
|
-p internal-minimal-versions
|
||||||
--doc
|
--doc
|
||||||
--all-features
|
--all-features
|
||||||
|
--locked
|
||||||
|
toolchain: ${{ env.MSRV }}
|
||||||
|
|
||||||
test-docs:
|
test-docs:
|
||||||
needs: check
|
needs: check
|
||||||
|
|||||||
@@ -4,4 +4,9 @@ members = [
|
|||||||
"axum-core",
|
"axum-core",
|
||||||
"axum-extra",
|
"axum-extra",
|
||||||
"axum-macros",
|
"axum-macros",
|
||||||
|
|
||||||
|
# internal crate used to bump the minimum versions we
|
||||||
|
# get for some dependencies which otherwise wouldn't build
|
||||||
|
# with `cargo +nightly update -Z minimal-versions`
|
||||||
|
"internal-minimal-versions",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ rustversion = "1.0"
|
|||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
syn = { version = "1.0", features = ["full", "extra-traits"] }
|
syn = { version = "1.0", features = ["full", "extra-traits"] }
|
||||||
tokio = { version = "1.0", features = ["full"] }
|
tokio = { version = "1.0", features = ["full"] }
|
||||||
trybuild = "1.0"
|
trybuild = "1.0.63"
|
||||||
|
|||||||
+2
-2
@@ -48,7 +48,7 @@ tower-service = "0.3"
|
|||||||
|
|
||||||
# optional dependencies
|
# optional dependencies
|
||||||
base64 = { version = "0.13", optional = true }
|
base64 = { version = "0.13", optional = true }
|
||||||
headers = { version = "0.3", optional = true }
|
headers = { version = "0.3.7", optional = true }
|
||||||
multer = { version = "2.0.0", optional = true }
|
multer = { version = "2.0.0", optional = true }
|
||||||
serde_json = { version = "1.0", features = ["raw_value"], optional = true }
|
serde_json = { version = "1.0", features = ["raw_value"], optional = true }
|
||||||
serde_urlencoded = { version = "0.7", optional = true }
|
serde_urlencoded = { version = "0.7", optional = true }
|
||||||
@@ -60,7 +60,7 @@ anyhow = "1.0"
|
|||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
quickcheck = "1.0"
|
quickcheck = "1.0"
|
||||||
quickcheck_macros = "1.0"
|
quickcheck_macros = "1.0"
|
||||||
reqwest = { version = "0.11", default-features = false, features = ["json", "stream", "multipart"] }
|
reqwest = { version = "0.11.11", default-features = false, features = ["json", "stream", "multipart"] }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
tokio = { version = "1.6.1", features = ["macros", "rt", "rt-multi-thread", "net", "test-util"] }
|
tokio = { version = "1.6.1", features = ["macros", "rt", "rt-multi-thread", "net", "test-util"] }
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
[package]
|
||||||
|
name = "internal-minimal-versions"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
publish = false
|
||||||
|
|
||||||
|
# these dependencies don't build if installed with `cargo +nightly update -Z
|
||||||
|
# minimal-versions` so we add them here to make sure we get a version that
|
||||||
|
# does build
|
||||||
|
#
|
||||||
|
# this only matters for axum's CI
|
||||||
|
[dependencies]
|
||||||
|
crc32fast = "1.3.2"
|
||||||
|
gcc = "0.3.55"
|
||||||
|
time = "0.3.9"
|
||||||
|
tungstenite = "0.17.2"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
// intentionally left empty
|
||||||
Reference in New Issue
Block a user