Skip to content

Commit

Permalink
Extend GraphQL version support and add CI (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie authored Jun 20, 2024
2 parents e8786dc + f2c4450 commit 88d610d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x]
graphql-version: [15.x, 16.x, ^17.0.0-alpha.3]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: yarn
- run: yarn build
# We must build BEFORE we replace the GraphQL version (because otherwise the types don't match)
- run: yarn add graphql@${{ matrix.graphql-version }}
- run: yarn test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
},
"dependencies": {
"graphile-config": "^0.0.1-beta.9",
"graphql": "^16.8.2",
"graphql": "15.x | ^16.8.2 | ^17.0.0-alpha.3",
"json5": "^2.2.3",
"kjsonl": "^0.0.1",
"tslib": "^2.6.3"
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ graphile-config@^0.0.1-beta.9:
tslib "^2.6.2"
yargs "^17.7.2"

graphql@^16.8.2:
"graphql@15.x | ^16.8.2 | ^17.0.0-alpha.3":
version "16.8.2"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.2.tgz#54771c7ff195da913f5e70af8044a026d32eca2a"
integrity sha512-cvVIBILwuoSyD54U4cF/UXDh5yAobhNV/tPygI4lZhgOIJQE/WLWC4waBRb4I6bDVYb3OVx3lfHbaQOEoUD5sg==
Expand Down

0 comments on commit 88d610d

Please sign in to comment.