-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI improvements and GraphQL v16 support (#1930)
* Improve CI * Improve CI * Add missing script * Add tscheck script * :) * Fix lint * Fix v14 * Fix match-graphql * :)) * Skip federation testts for non v15 * Fix for v16 * Bump wrap * Improve CI cache * Add changeset * Ignore node version in benchmark
- Loading branch information
Showing
23 changed files
with
1,487 additions
and
376 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'graphql-modules': minor | ||
--- | ||
|
||
feat: GraphQL v16 support |
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: {} | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Master | ||
uses: actions/checkout@v2 | ||
- name: Use Node | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: 17 | ||
- name: Cache Yarn | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-17-15-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-17-15-yarn | ||
- name: Install Dependencies using Yarn | ||
run: yarn install --ignore-engines && git checkout yarn.lock | ||
- name: Lint | ||
run: yarn lint | ||
build: | ||
name: Type Check on GraphQL v${{matrix.graphql_version}} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
graphql_version: | ||
- 14 | ||
- 15 | ||
- 16.0.0-rc.7 | ||
steps: | ||
- name: Checkout Master | ||
uses: actions/checkout@v2 | ||
- name: Use Node | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: 17 | ||
- name: Cache Yarn | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-17-${{matrix.graphql_version}}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-17-${{matrix.graphql_version}}-yarn- | ||
- name: Use GraphQL v${{matrix.graphql_version}} | ||
run: node ./scripts/match-graphql.js ${{matrix.graphql_version}} | ||
- name: Install Dependencies using Yarn | ||
run: yarn install --ignore-engines && git checkout yarn.lock | ||
- name: Type Check | ||
run: yarn ts:check | ||
test: | ||
name: Unit Test on Node ${{matrix.node-version}} (${{matrix.os}}) and GraphQL v${{matrix.graphql_version}} | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] # remove windows to speed up the tests | ||
node-version: [12, 17] | ||
graphql_version: | ||
- 14 | ||
- 15 | ||
- 16.0.0-rc.7 | ||
steps: | ||
- name: Checkout Master | ||
uses: actions/checkout@v2 | ||
- name: Use Node | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Cache Yarn | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-${{matrix.node-version}}-${{matrix.graphql_version}}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{matrix.node-version}}-${{matrix.graphql_version}}-yarn- | ||
- name: Use GraphQL v${{matrix.graphql_version}} | ||
run: node ./scripts/match-graphql.js ${{matrix.graphql_version}} | ||
- name: Install Dependencies using Yarn | ||
run: yarn install --ignore-engines && git checkout yarn.lock | ||
- name: Cache Jest | ||
uses: actions/cache@v2 | ||
with: | ||
path: .cache/jest | ||
key: ${{ runner.os }}-${{matrix.node-version}}-${{matrix.graphql_version}}-jest-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{matrix.node-version}}-${{matrix.graphql_version}}-jest- | ||
- name: Test | ||
run: yarn test --ci | ||
env: | ||
CI: true | ||
test_esm: | ||
name: ESM Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Master | ||
uses: actions/checkout@v2 | ||
- name: Use Node | ||
uses: actions/setup-node@master | ||
with: | ||
node-version: 17 | ||
- name: Cache Yarn | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-17-15-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-17-15-yarn- | ||
- name: Install Dependencies using Yarn | ||
run: yarn install --ignore-engines && git checkout yarn.lock | ||
- name: Build Packages | ||
run: yarn build | ||
- name: Test ESM | ||
run: node scripts/test-esm.mjs |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.DS_Store": true, | ||
"**/node_modules": true, | ||
"test-lib": true, | ||
"lib": true, | ||
"coverage": true, | ||
"npm": true, | ||
"**/dist": true | ||
}, | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ targets: { node: process.versions.node.split('.')[0] } }, | ||
], | ||
'@babel/preset-typescript', | ||
], | ||
plugins: [ | ||
'babel-plugin-transform-typescript-metadata', | ||
['@babel/plugin-proposal-decorators', { legacy: true }], | ||
'babel-plugin-parameter-decorator', | ||
'@babel/plugin-proposal-class-properties', | ||
], | ||
}; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.