Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MSRV check to CI #465

Merged
merged 11 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cargo.lock binary
42 changes: 42 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: 2
updates:
# bump major and minor updates as soon as available
- package-ecosystem: cargo
target-branch: main # see https://github.com/dependabot/dependabot-core/issues/1778#issuecomment-1988140219
directory: /
schedule:
interval: daily
commit-message:
prefix: chore
include: scope
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-patch"

# bundle patch updates together on a monthly basis
- package-ecosystem: cargo
directory: /
schedule:
interval: monthly
commit-message:
prefix: chore
include: scope
groups:
patch-updates:
update-types:
- patch
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-minor"
- "version-update:semver-major"

# bump actions as soon as available
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
commit-message:
prefix: chore
include: scope
37 changes: 27 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,32 @@ jobs:
toolchain: ${{ env.clippy_rust_version }}
components: clippy
- run: cargo clippy --all --all-targets --all-features -- -D warnings

prettier:
name: Check prettier

msrv:
runs-on: ubuntu-latest
if: github.repository == 'graphql-rust/graphql-client'
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install node.js
run: sudo apt update && sudo apt-get install -y nodejs
- name: Execute prettier
run: npx prettier --debug-check -l './**/*.json' './**/*.graphql'
- uses: actions/checkout@master
- name: Get MSRV from Cargo.toml
run: |
MSRV=$(grep 'rust-version' Cargo.toml | sed 's/.*= *"\(.*\)".*/\1/')
echo "MSRV=$MSRV" >> $GITHUB_ENV
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}
- uses: taiki-e/install-action@cargo-no-dev-deps
- run: cargo no-dev-deps check -p graphql_client

# Automatically merge if it's a Dependabot PR that passes the build
dependabot:
needs: [test, wasm_build, lint, msrv]
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/target
node_modules/
**/*.rs.bk
Cargo.lock
.idea
scripts/*
!scripts/*.sh
Expand Down
Loading