-
Notifications
You must be signed in to change notification settings - Fork 153
126 lines (109 loc) · 3.99 KB
/
performance-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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: "Performance Tests"
on:
pull_request:
branches:
- dev
- lts
- "*.*.*"
paths:
- "packages/graphql/tests/tck/**"
jobs:
performance-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:
- name: Setup Node.js
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
with:
node-version: lts/*
- name: Target Branch - Check out
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ github.base_ref }}
fetch-depth: 0
- name: Target Branch - Install dependencies
run: yarn --immutable
- run: mkdir ./performance
working-directory: packages/graphql
- name: Target Branch - Run @neo4j/graphql performance tests and create snapshot
run: |
yarn performance # Warmup
yarn performance -u
working-directory: packages/graphql
env:
NEO_USER: neo4j
NEO_PASSWORD: password
NEO_URL: bolt://localhost:7687
- name: Target Branch - Run @neo4j/graphql Schema performance tests
run: |
yarn performance --schema # Warmup
VAR1=$(yarn performance --schema) && echo "Old $VAR1" > ./performance/schemaPerformance
working-directory: packages/graphql
env:
NEO_USER: neo4j
NEO_PASSWORD: password
NEO_URL: bolt://localhost:7687
- name: Target Branch - Run @neo4j/graphql Subgraph Schema performance tests
run: |
yarn performance --subgraph-schema # Warmup
VAR1=$(yarn performance --subgraph-schema) && echo "Old $VAR1" > ./performance/subgraphSchemaPerformance
working-directory: packages/graphql
env:
NEO_USER: neo4j
NEO_PASSWORD: password
NEO_URL: bolt://localhost:7687
- name: PR Branch - Check out
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ github.ref }}
clean: false
- name: PR Branch - Install dependencies
run: yarn --immutable
- name: PR Branch - Run @neo4j/graphql performance tests
run: |
yarn performance # Warmup
yarn performance --markdown > ./performance/performanceReport
working-directory: packages/graphql
env:
NEO_USER: neo4j
NEO_PASSWORD: password
NEO_URL: bolt://localhost:7687
- name: PR Branch - Run @neo4j/graphql Schema performance tests
run: |
yarn performance --schema # Warmup
yarn performance --schema >> ./performance/schemaPerformance
cat ./performance/schemaPerformance >> ./performance/performanceReport
working-directory: packages/graphql
env:
NEO_USER: neo4j
NEO_PASSWORD: password
NEO_URL: bolt://localhost:7687
- name: PR Branch - Run @neo4j/graphql Subgraph Schema performance tests
run: |
yarn performance --subgraph-schema # Warmup
yarn performance --subgraph-schema >> ./performance/subgraphSchemaPerformance
cat ./performance/subgraphSchemaPerformance >> ./performance/performanceReport
working-directory: packages/graphql
env:
NEO_USER: neo4j
NEO_PASSWORD: password
NEO_URL: bolt://localhost:7687
- name: Save PR number
env:
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
run: |
echo "$PULL_REQUEST_NUMBER" > ./performance/prnumber
working-directory: packages/graphql
- name: Archive performance test results
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: performance
path: packages/graphql/performance/