dynamic-graphql 0.10.1

Dynamic GraphQL schema
Documentation
name: CI

on:
  push:
    branches: [ "main" ]
    tags: [ "v*" ]
  pull_request:
    branches: [ "main" ]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:
  RUST_BACKTRACE: 1
  NIGHTLY_VERSION: nightly-2025-03-16


jobs:

  ##########################
  # Linting and formatting #
  ##########################

  clippy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable
          components: clippy

      - run: cargo clippy --workspace -- -D warnings
      - run: cargo clippy --workspace --tests -- -D warnings

  rustfmt:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@nightly
        with:
          toolchain: $NIGHTLY_VERSION
          components: rustfmt

      - run: cargo +$NIGHTLY_VERSION fmt --all -- --check

  ###########
  # Testing #
  ###########

  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable

      - run: cargo test --workspace
        env:
          # fix rustdoc issue with macros
          CARGO_TARGET_TMPDIR: ""

  #################
  # Documentation #
  #################

  rustdoc:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@nightly
        with:
          toolchain: $NIGHTLY_VERSION

      - run: cargo +$NIGHTLY_VERSION doc --workspace --no-deps
        env:
          RUSTDOCFLAGS: --cfg docsrs