Merge pull request #469 from chipsenkbeil/minimum-rust-version-support

Add minimum rust version support in workflow
This commit is contained in:
Sunli 2021-04-04 14:39:19 +08:00 committed by GitHub
commit ca6ebc9790
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 85 additions and 13 deletions

View File

@ -9,8 +9,15 @@ on:
- master - master
jobs: jobs:
build: tests:
runs-on: ubuntu-latest name: Run tests - Rust (${{ matrix.rust }}) on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { rust: stable, os: ubuntu-latest }
- { rust: 1.50.0, os: ubuntu-latest }
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -18,13 +25,8 @@ jobs:
submodules: true submodules: true
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:
toolchain: stable toolchain: ${{ matrix.rust }}
override: true override: true
components: clippy, rustfmt
- name: Check format
run: cargo fmt --all -- --check
- name: Check with clippy
run: cargo clippy --all
- name: Build with all features - name: Build with all features
run: cargo build --all-features run: cargo build --all-features
- name: Build - name: Build
@ -34,7 +36,66 @@ jobs:
- name: Clean - name: Clean
run: cargo clean run: cargo clean
# examples rustfmt:
name: Run rustfmt - Rust (${{ matrix.rust }}) on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { rust: stable, os: ubuntu-latest }
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt
- name: Check format
run: cargo fmt --all -- --check
clippy:
name: Run clippy - Rust (${{ matrix.rust }}) on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { rust: stable, os: ubuntu-latest }
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
components: clippy
- name: Check with clippy
run: cargo clippy --all
examples:
name: Build examples - Rust (${{ matrix.rust }}) on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { rust: stable, os: ubuntu-latest }
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
components: clippy, rustfmt
- name: Check examples format - name: Check examples format
run: cargo fmt --all -- --check run: cargo fmt --all -- --check
working-directory: ./examples working-directory: ./examples
@ -48,12 +109,23 @@ jobs:
run: cargo clean run: cargo clean
working-directory: ./examples working-directory: ./examples
# build on nightly build-nightly:
name: Build nightly - Rust (${{ matrix.rust }}) on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { rust: nightly, os: ubuntu-latest }
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:
toolchain: nightly toolchain: ${{ matrix.rust }}
override: true override: true
components: clippy, rustfmt
- name: Build on nightly with all features - name: Build on nightly with all features
run: cargo build --all-features run: cargo build --all-features
- name: Build on nightly - name: Build on nightly

View File

@ -34,7 +34,7 @@
* [Docs](https://docs.rs/async-graphql) * [Docs](https://docs.rs/async-graphql)
* [GitHub repository](https://github.com/async-graphql/async-graphql) * [GitHub repository](https://github.com/async-graphql/async-graphql)
* [Cargo package](https://crates.io/crates/async-graphql) * [Cargo package](https://crates.io/crates/async-graphql)
* Minimum supported Rust version: 1.46 or later * Minimum supported Rust version: 1.50.0 or later
## Safety ## Safety