-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 🐛 fix generated sources names * ♻️ Get directive type definition from lib for more isolation * 🏗️ Add api for integration tests * 👷 run tests tasks * ✅ add tests * 🤡 Replace api with camouflage * ✅ Add tests for noAuth and headers directives * 👷 wait 30s for services to be ready before running tests --------- Co-authored-by: Mbaye THIAM <[email protected]>
- Loading branch information
Showing
45 changed files
with
2,676 additions
and
73 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,60 @@ | ||
name: Run Integration Tests | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
integration-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
services: | ||
registry: | ||
image: registry:2 | ||
ports: | ||
- 5000:5000 | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
driver-opts: network=host | ||
|
||
- name: Copy patches for Docker Buildx | ||
run: cp -r patches/* packages/graphql-mesh/patches | ||
|
||
- name: Build and push on local registry | ||
id: docker_build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./packages/graphql-mesh | ||
push: true | ||
tags: localhost:5000/test/graphql-mesh:latest | ||
platforms: linux/amd64 | ||
|
||
- name: Setup services for testing purpose | ||
run: export IMAGE_TAG=localhost:5000/test/graphql-mesh:latest && cd ./test/integration && docker compose up -d | ||
|
||
- name: Wait for services to be ready | ||
run: sleep 30 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: cd ./test/integration/tests && npm install | ||
|
||
- name: Run tests | ||
run: cd ./test/integration/tests && npm test |
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
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 |
---|---|---|
@@ -1,16 +1,4 @@ | ||
/// <reference types="vitest" /> | ||
// Configure Vitest (https://vitest.dev/config/) | ||
import { resolve } from 'path' | ||
import { defineConfig } from 'vite' | ||
import dts from 'vite-plugin-dts' | ||
// https://vitejs.dev/guide/build.html#library-mode | ||
export default defineConfig({ | ||
build: { | ||
lib: { | ||
entry: resolve(__dirname, 'src/index.ts'), | ||
name: 'my-lib', | ||
fileName: 'my-lib' | ||
} | ||
}, | ||
plugins: [dts()] | ||
}) | ||
export default defineConfig({}) |
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
Binary file modified
BIN
+175 Bytes
(110%)
packages/graphql-mesh/local-pkg/directive-headers-1.0.0.tgz
Binary file not shown.
Binary file modified
BIN
+135 Bytes
(110%)
packages/graphql-mesh/local-pkg/directive-no-auth-1.0.0.tgz
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-10 Bytes
(100%)
packages/graphql-mesh/local-pkg/inject-additional-transforms-1.0.0.tgz
Binary file not shown.
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.