forked from neo4j/graphql
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (80 loc) · 2.97 KB
/
reusable-integration-tests-on-prem.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
name: "Integration tests (on-prem)"
on:
workflow_call:
inputs:
disable-coverage-archival:
description: "Whether or not to archive the test coverage"
required: false
default: false
type: boolean
jobs:
integration-tests:
strategy:
matrix:
packages:
[
{ package: "introspector", shard: 1/1, coverage_name: 2 },
{ package: "graphql", shard: 1/4, coverage_name: 3 },
{ package: "graphql", shard: 2/4, coverage_name: 4 },
{ package: "graphql", shard: 3/4, coverage_name: 5 },
{ package: "graphql", shard: 4/4, coverage_name: 6 },
]
neo4j-version:
# - 5-community
- 5-enterprise
graphql-version: [
{
version: "^15.0.0",
coverage_path: 15
},
{
version: "^16.0.0",
coverage_path: 16
}
]
runs-on: ubuntu-latest
services:
neo4j:
image: neo4j:${{ matrix.neo4j-version }}
env:
NEO4J_AUTH: neo4j/password
NEO4J_PLUGINS: '["apoc"]'
NEO4J_ACCEPT_LICENSE_AGREEMENT: yes
ports:
- 7687:7687
steps:
- name: Check out repository code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: lts/*
cache: yarn
- name: Install dependencies
run: yarn --immutable
- name: Overwrite GraphQL version
run: yarn up --exact graphql@${{ matrix.graphql-version.version }}
- name: Run @neo4j/graphql integration tests and move coverage
run: |
yarn test:int --shard=${{ matrix.packages.shard }} --coverage
mv coverage coverage-${{ matrix.neo4j-version }}-${{ matrix.graphql-version.coverage_path }}
working-directory: packages/${{ matrix.packages.package }}
env:
NEO_USER: neo4j
NEO_PASSWORD: password
NEO_URL: bolt://localhost:7687
- if: ${{ !inputs.disable-coverage-archival && matrix.packages.package == 'graphql' }}
name: Archive coverage report
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: integration-coverage-${{ matrix.packages.package }}-${{ matrix.neo4j-version }}-${{ matrix.graphql-version.coverage_path }}-${{ matrix.packages.coverage_name }}
path: packages/${{ matrix.packages.package }}/coverage-${{ matrix.neo4j-version }}-${{ matrix.graphql-version.coverage_path }}/
merge-integration-tests-results:
runs-on: ubuntu-latest
needs: integration-tests
steps:
- if: ${{ !inputs.disable-coverage-archival }}
name: Merge Artifacts
uses: actions/upload-artifact/merge@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: integration-coverage
pattern: integration-coverage-*