Reorganize tests (#456)

* Reorganize tests

This breaks up the large `crate::tests` module by moving some of the
tests into a place that makes more sense. For example tests of JSON
serialization are moved to the `crate::json` module. The remaining routing
tests have been moved to `crate::routing::tests`.

I generally prefer having tests close to the code they're testing. Makes
it easier to see how/if something is tested.

* Try pinning to older version of async-graphql

* Revert "Try pinning to older version of async-graphql"

This reverts commit 2e2cae7d12f5e433a16d6607497d587863f04384.

* don't test examples on 1.54 on CI

* move ci steps around a bit
This commit is contained in:
David Pedersen
2021-11-03 10:22:31 +01:00
committed by GitHub
parent 420918a53a
commit 0f1f28062d
27 changed files with 427 additions and 361 deletions
+23 -2
View File
@@ -64,12 +64,11 @@ jobs:
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]
rust: [stable, beta, nightly]
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
@@ -84,6 +83,28 @@ jobs:
command: test
args: --all --all-features --all-targets
# some examples doesn't support 1.54 (such as async-graphql)
# so we only test axum itself on 1.54
test-msrv:
needs: check
runs-on: ubuntu-latest
strategy:
matrix:
rust: [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: -p axum --all-features --all-targets
test-docs:
needs: check
runs-on: ubuntu-latest