forked from neo4j/graphql
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (86 loc) · 2.48 KB
/
Copy pathreusable-api-library-tests.yml
File metadata and controls
94 lines (86 loc) · 2.48 KB
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
name: "@neo4j/graphql specific tests"
on:
workflow_call:
secrets:
CODECOV_TOKEN:
description: "API token for Codecov, if it is available in the current context"
required: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
tck-tests:
runs-on: ubuntu-latest
strategy:
matrix:
shard:
- 1/4
- 2/4
- 3/4
- 4/4
graphql-version:
- "^15.0.0"
- "^16.0.0"
neo4j-version:
- 4.3-enterprise
- 4.4-community
- 4.4-enterprise
- 5-community
- 5-enterprise
services:
neo4j:
image: neo4j:${{ matrix.neo4j-version }}
env:
NEO4J_AUTH: neo4j/password
NEO4JLABS_PLUGINS: '["apoc"]'
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
ports:
- 7687:7687
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: yarn
- name: Install dependencies
run: yarn
- name: Overwrite GraphQL version
run: yarn up --exact graphql@${{ matrix.graphql-version }}
- name: Run TCK tests
run: yarn --cwd packages/graphql run test:tck --shard=${{ matrix.shard }} --coverage
env:
VERIFY_TCK: true
NEO_USER: neo4j
- if: ${{ env.CODECOV_TOKEN != '' }}
name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./packages/graphql/coverage/
flags: graphql,tck
fail_ci_if_error: true
schema-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
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: ${{ env.CODECOV_TOKEN != '' }}
name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./packages/graphql/coverage/
flags: graphql,schema
fail_ci_if_error: true
- if: ${{ env.CODECOV_TOKEN != '' }}
name: Archive coverage report
uses: actions/upload-artifact@v3
with:
name: api-library-coverage-graphql
path: packages/graphql/coverage/