Skip to content

Support TypeDirective for ArgumentDefinition, Enum, EnumValue, InputFieldDefinition, InputObject, Interface #2768

Support TypeDirective for ArgumentDefinition, Enum, EnumValue, InputFieldDefinition, InputObject, Interface

Support TypeDirective for ArgumentDefinition, Enum, EnumValue, InputFieldDefinition, InputObject, Interface #2768

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
name: Run tests - Rust (${{ matrix.rust }}) on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { rust: stable, os: ubuntu-20.04 }
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
components: rustfmt
override: true
- name: Build with all features
run: cargo build --all-features
- name: Build
run: cargo build --workspace --verbose
- name: Run tests
run: cargo test --workspace --all-features
- name: Clean
run: cargo clean
tests_min_compat:
name: Run min rust version tests - Rust (${{ matrix.rust }}) on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { rust: 1.75.0, os: ubuntu-20.04 }
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
components: rustfmt
override: true
- name: Build with all features
run: cargo build --all-features
- name: Build
run: cargo build --workspace --verbose
- name: Run tests
run: cargo test --workspace --all-features
- name: Clean
run: cargo clean
rustfmt:
name: Run rustfmt - Rust (${{ matrix.rust }}) on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { rust: nightly-2023-09-07, os: ubuntu-20.04 }
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 +${{ matrix.rust }} fmt --all -- --check
- name: Check examples format
working-directory: ./examples
run: cargo +${{ matrix.rust }} 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-20.04 }
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
book_examples:
name: Test book examples
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Install mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "0.4.22"
- name: Build with all features
run: cargo build --workspace --all-features
- name: Run book tests for en language
run: mdbook test -L target/debug/deps ./docs/en
- name: Run book tests for zh-CN language
run: mdbook test -L target/debug/deps ./docs/zh-CN
- name: Clean
run: cargo clean
examples:
name: Build examples - Rust (${{ matrix.rust }}) on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { rust: stable, os: ubuntu-20.04 }
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 with clippy
run: cargo clippy --all
working-directory: ./examples
- name: Build examples
run: cargo build --workspace --verbose
working-directory: ./examples
- name: Clean examples
run: cargo clean
working-directory: ./examples
autocorrect:
name: AutoCorrect Lint
runs-on: ubuntu-latest
steps:
- name: Check source code
uses: actions/checkout@v3
- name: AutoCorrect
uses: huacnlee/autocorrect-action@v2
with:
args: --lint --no-diff-bg-color docs/