Feat/monitoring #114
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
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 |