-
Notifications
You must be signed in to change notification settings - Fork 40
85 lines (82 loc) · 3.07 KB
/
Copy pathmemtest.yml
File metadata and controls
85 lines (82 loc) · 3.07 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
name: Memtest
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NODE_NO_WARNINGS: 1
K6_VERSION: v0.56.0
jobs:
memtest:
strategy:
fail-fast: false
matrix:
test:
- name: auto-type-merging
hive-router-runtime: 0
- name: federation-example
hive-router-runtime: 0
- name: federation-example
hive-router-runtime: 1
- name: federation-mixed
hive-router-runtime: 0
- name: federation-subscriptions-passthrough
hive-router-runtime: 0
- name: opentelemetry
hive-router-runtime: 0
- name: programmatic-batching
hive-router-runtime: 0
- name: logger
hive-router-runtime: 0
e2e_runner:
- node
# - bun TODO: get memory snaps and heap sampling for bun. is it even necessary?
name: ${{matrix.e2e_runner}} / ${{matrix.test.name}} ${{ matrix.test.hive-router-runtime && 'with hive router runtime' || '' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
- name: Install k6
run: |
mkdir -p "$HOME/.local/bin"
cd "$HOME/.local/bin"
curl https://github.com/grafana/k6/releases/download/${{ env.K6_VERSION }}/k6-${{ env.K6_VERSION }}-linux-amd64.tar.gz -L | tar xvz --strip-components 1
echo "$PWD" >> $GITHUB_PATH
- name: Set up env
uses: the-guild-org/shared-config/setup@v1
with:
# TODO: should we test more node versions? we usually always recommend upgrading to
# latest when people suspect leaks - latest is always the most stable
node-version-file: .node-version
- if: runner.os == 'Linux'
name: Hash Docker Images
id: hash-docker-images
run: | # get all "image: '" occurrences in the e2e tests and hash them
echo "result=$(grep -r -h "image: '" e2e | shasum | base64)" >> "$GITHUB_OUTPUT"
- if: runner.os == 'Linux'
name: Cache Docker Images
uses: ScribeMD/docker-cache@e1be5d7e63cc5f0c6400d8cb86d3d899a7fd71e2 # 0.5.0 + https://github.com/ScribeMD/docker-cache/pull/838
continue-on-error: true
with:
key: docker-images-${{ runner.os }}-${{ steps.hash-docker-images.outputs.result }}
- name: Test
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3
with:
timeout_minutes: 60
max_attempts: 5
command: yarn test:mem ${{matrix.test.name}}
env:
HIVE_ROUTER_RUNTIME: ${{matrix.test.hive-router-runtime}}
E2E_GATEWAY_RUNNER: ${{matrix.e2e_runner}}
- name: Upload heap snapshots
if: failure()
uses: actions/upload-artifact@v6.0.0
with:
name: ${{matrix.test.name}}-heap-snapshots
path: |
e2e/${{matrix.test.name}}/*.heapsnapshot
packages/logger/tests/*.heapsnapshot