diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b460d34..00a3e265 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,8 +12,8 @@ env: jobs: # `cargo hack --each-feature` runs the given command for each feature, including "no features", "all features", # and the `default` feature. - roadster_each_feature: - name: Each feature + test: + name: Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -22,13 +22,47 @@ jobs: - uses: taiki-e/install-action@nextest - name: Test run: cargo hack nextest run --no-fail-fast --each-feature --workspace + + doc_test: + name: Doc tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: Swatinem/rust-cache@v2 + - uses: taiki-e/install-action@cargo-hack - name: Doc test run: cargo hack test --doc --no-fail-fast --each-feature --workspace + + check: + name: Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: Swatinem/rust-cache@v2 + - uses: taiki-e/install-action@cargo-hack - name: Check run: cargo hack check --each-feature --no-dev-deps --workspace + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: Swatinem/rust-cache@v2 + - uses: taiki-e/install-action@cargo-hack - name: Clippy run: cargo hack clippy --workspace --all-targets --each-feature -- -D warnings + # https://doc.rust-lang.org/cargo/guide/continuous-integration.html#verifying-rust-version + msrv: + name: Check MSRV + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: Swatinem/rust-cache@v2 + - uses: taiki-e/install-action@cargo-hack + - run: cargo hack check --rust-version --workspace --all-targets --ignore-private + check_formatting: name: Formatting runs-on: ubuntu-latest diff --git a/Cargo.toml b/Cargo.toml index 27cbf539..761a4954 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,8 @@ repository = "https://github.com/roadster-rs/roadster" license = "MIT OR Apache-2.0" keywords = ["web", "framework"] categories = ["web-programming", "web-programming::http-server"] +# Determined using `cargo msrv` -- https://github.com/foresterre/cargo-msrv +rust-version = "1.74.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html