Skip to content

Commit d06dfff

Browse files
authored
Merge pull request #465 from danieleades/msrv
Add MSRV check to CI
2 parents d7a5143 + d809a8c commit d06dfff

File tree

7 files changed

+2321
-11
lines changed

7 files changed

+2321
-11
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Cargo.lock binary

.github/dependabot.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
version: 2
2+
updates:
3+
# bump major and minor updates as soon as available
4+
- package-ecosystem: cargo
5+
target-branch: main # see https://github.com/dependabot/dependabot-core/issues/1778#issuecomment-1988140219
6+
directory: /
7+
schedule:
8+
interval: daily
9+
commit-message:
10+
prefix: chore
11+
include: scope
12+
ignore:
13+
- dependency-name: "*"
14+
update-types:
15+
- "version-update:semver-patch"
16+
17+
# bundle patch updates together on a monthly basis
18+
- package-ecosystem: cargo
19+
directory: /
20+
schedule:
21+
interval: monthly
22+
commit-message:
23+
prefix: chore
24+
include: scope
25+
groups:
26+
patch-updates:
27+
update-types:
28+
- patch
29+
ignore:
30+
- dependency-name: "*"
31+
update-types:
32+
- "version-update:semver-minor"
33+
- "version-update:semver-major"
34+
35+
# bump actions as soon as available
36+
- package-ecosystem: github-actions
37+
directory: /
38+
schedule:
39+
interval: daily
40+
commit-message:
41+
prefix: chore
42+
include: scope

.github/workflows/ci.yml

+27-10
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,32 @@ jobs:
6464
toolchain: ${{ env.clippy_rust_version }}
6565
components: clippy
6666
- run: cargo clippy --all --all-targets --all-features -- -D warnings
67-
68-
prettier:
69-
name: Check prettier
67+
68+
msrv:
7069
runs-on: ubuntu-latest
71-
if: github.repository == 'graphql-rust/graphql-client'
7270
steps:
73-
- name: Checkout sources
74-
uses: actions/checkout@v4
75-
- name: Install node.js
76-
run: sudo apt update && sudo apt-get install -y nodejs
77-
- name: Execute prettier
78-
run: npx prettier --debug-check -l './**/*.json' './**/*.graphql'
71+
- uses: actions/checkout@master
72+
- name: Get MSRV from Cargo.toml
73+
run: |
74+
MSRV=$(grep 'rust-version' Cargo.toml | sed 's/.*= *"\(.*\)".*/\1/')
75+
echo "MSRV=$MSRV" >> $GITHUB_ENV
76+
- uses: dtolnay/rust-toolchain@master
77+
with:
78+
toolchain: ${{ env.MSRV }}
79+
- uses: taiki-e/install-action@cargo-no-dev-deps
80+
- run: cargo no-dev-deps check -p graphql_client
81+
82+
# Automatically merge if it's a Dependabot PR that passes the build
83+
dependabot:
84+
needs: [test, wasm_build, lint, msrv]
85+
permissions:
86+
contents: write
87+
pull-requests: write
88+
runs-on: ubuntu-latest
89+
if: github.actor == 'dependabot[bot]'
90+
steps:
91+
- name: Enable auto-merge for Dependabot PRs
92+
run: gh pr merge --auto --merge "$PR_URL"
93+
env:
94+
PR_URL: ${{github.event.pull_request.html_url}}
95+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/target
22
node_modules/
33
**/*.rs.bk
4-
Cargo.lock
54
.idea
65
scripts/*
76
!scripts/*.sh

0 commit comments

Comments
 (0)