mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-30 04:02:42 +01:00
857ecd7314
For 0.3 I'm thinking about some changes I wanna make to the docs. I don't like how information is currently spread over so many places. Still thinking about how I wanna re-organize it. However I do think it makes sense to break the root module docs into separate files that get included with `#![doc = include_str!("file")]`. Makes working on a single section easier and more focused. It looks the same for the user reading the docs. This means axum's MSRV is now 1.54 but since thats two releases ago I'm fine with that.
109 lines
2.7 KiB
YAML
109 lines
2.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request: {}
|
|
|
|
jobs:
|
|
check:
|
|
# Run `cargo check` first to ensure that the pushed code at least compiles.
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
profile: minimal
|
|
components: clippy
|
|
- uses: Swatinem/rust-cache@v1
|
|
- name: Check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: --all --all-targets --all-features
|
|
- name: rustfmt
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
|
|
check-docs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
profile: minimal
|
|
- uses: Swatinem/rust-cache@v1
|
|
- name: cargo doc
|
|
working-directory: ${{ matrix.subcrate }}
|
|
env:
|
|
RUSTDOCFLAGS: "-D broken-intra-doc-links"
|
|
run: cargo doc --all-features --no-deps
|
|
|
|
cargo-hack:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
profile: minimal
|
|
- uses: Swatinem/rust-cache@v1
|
|
- name: Install cargo-hack
|
|
run: |
|
|
curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin
|
|
- name: cargo hack check
|
|
working-directory: ${{ matrix.subcrate }}
|
|
run: cargo hack check --each-feature --no-dev-deps --all
|
|
|
|
test-versions:
|
|
# Test against the stable, beta, and nightly Rust toolchains on ubuntu-latest.
|
|
needs: check
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
rust: [stable, beta, nightly, 1.54]
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
profile: minimal
|
|
- uses: Swatinem/rust-cache@v1
|
|
- name: Run tests
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --all --all-features --all-targets
|
|
|
|
test-docs:
|
|
needs: check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
profile: minimal
|
|
- uses: Swatinem/rust-cache@v1
|
|
- name: Run doc tests
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --all-features --doc
|
|
|
|
deny-check:
|
|
name: cargo-deny check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- uses: EmbarkStudios/cargo-deny-action@v1
|