-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.51 KB
/
integration-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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: Inspect network
run: docker network inspect integration_default
- 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