forked from neo4j/graphql
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (88 loc) · 2.73 KB
/
reusable-api-library-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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: "@neo4j/graphql specific tests"
on:
workflow_call:
inputs:
disable-coverage-archival:
description: "Whether or not to archive the test coverage"
required: false
default: false
type: boolean
jobs:
tck-tests:
runs-on: ubuntu-latest
strategy:
matrix:
shard:
- 1/4
- 2/4
- 3/4
- 4/4
version:
[
{ graphql: "^15.0.0", neo4j: "5-enterprise" },
{ graphql: "^16.0.0", neo4j: "5-community" },
{ graphql: "^16.0.0", neo4j: "5-enterprise" },
]
services:
neo4j:
image: neo4j:${{ matrix.version.neo4j }}
env:
NEO4J_AUTH: neo4j/password
NEO4J_PLUGINS: '["apoc"]'
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
ports:
- 7687:7687
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: lts/*
cache: yarn
- name: Install dependencies
run: yarn
- name: Overwrite GraphQL version
run: yarn up --exact graphql@${{ matrix.version.graphql }}
- name: Run TCK tests
run: yarn --cwd packages/graphql run test:tck --shard=${{ matrix.shard }} --coverage
env:
VERIFY_TCK: true
NEO_USER: neo4j
e2e-tests:
runs-on: ubuntu-latest
services:
neo4j:
image: neo4j:5-enterprise
env:
NEO4J_AUTH: neo4j/password
NEO4J_PLUGINS: '["apoc"]'
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
ports:
- 7687:7687
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: lts/*
cache: yarn
- name: Install dependencies
run: yarn
- name: Run E2E tests
run: yarn --cwd packages/graphql run test e2e --coverage
schema-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: lts/*
cache: yarn
- name: Install dependencies
run: yarn
- name: Run Schema tests
run: yarn --cwd packages/graphql run test:schema --coverage
- if: ${{ !inputs.disable-coverage-archival }}
name: Archive coverage report
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: api-library-coverage-graphql
path: packages/graphql/coverage/