chore(deps): bump actions/checkout from 5 to 6 #85
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| tests-pass: | |
| name: all systems go | |
| runs-on: ubuntu-latest | |
| if: ${{ always() && contains(needs.*.result, 'failure') }} | |
| steps: | |
| - run: exit 1 | |
| needs: | |
| - tests | |
| - rustfmt | |
| - clippy | |
| - book_examples | |
| - autocorrect | |
| tests: | |
| name: Run tests - Rust (${{ matrix.rust }}) on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { rust: stable, os: ubuntu-22.04 } | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| components: rustfmt | |
| - name: Extract metadata | |
| id: meta | |
| run: | | |
| FEATURES=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "async-graphql") | .features | keys | map(select(. != "boxed-trait")) | join(",")') | |
| echo "features=$FEATURES" >> "$GITHUB_OUTPUT" | |
| - name: Build with all features | |
| run: cargo build --all-features | |
| - name: Build with all features except boxed-trait | |
| run: cargo build --features ${{ steps.meta.outputs.features }} | |
| - name: Build | |
| run: cargo build --workspace --verbose | |
| - name: Run tests | |
| run: cargo test --workspace --features ${{ steps.meta.outputs.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-2025-04-09, os: ubuntu-22.04 } | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| components: rustfmt | |
| - name: Check format | |
| 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-22.04 } | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| components: clippy | |
| - name: Check with clippy | |
| run: cargo clippy --all --all-features --all-targets | |
| book_examples: | |
| name: Test book examples | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| - name: Install mdBook | |
| uses: peaceiris/actions-mdbook@v2 | |
| with: | |
| mdbook-version: "0.4.49" | |
| - name: Extract metadata | |
| id: meta | |
| run: | | |
| FEATURES=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[] | select(.name == "async-graphql") | .features | keys | map(select(. != "boxed-trait")) | join(",")') | |
| echo "features=$FEATURES" >> "$GITHUB_OUTPUT" | |
| - name: Build with all features | |
| run: cargo build --workspace --features ${{ steps.meta.outputs.features }} | |
| - name: Run book tests for en language | |
| run: mdbook test -L target/debug/deps ./docs/en | |
| - name: Clean | |
| run: cargo clean | |
| autocorrect: | |
| name: AutoCorrect Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check source code | |
| uses: actions/checkout@v6 | |
| - name: AutoCorrect | |
| uses: huacnlee/autocorrect-action@v2 | |
| with: | |
| args: --lint --no-diff-bg-color docs/ |