-
Notifications
You must be signed in to change notification settings - Fork 9
92 lines (83 loc) · 2.94 KB
/
run-graphql.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
name: GraphQL
on:
workflow_call:
inputs:
build_proxy_image:
description: "Shall we build proxy image"
default: false
required: false
type: boolean
library:
description: "Library to test"
required: true
type: string
weblogs:
description: "JSON array of weblogs to run"
default: "[]"
required: false
type: string
binaries_artifact:
description: "Artifact name containing the binaries to test"
default: ''
required: false
type: string
ci_environment:
description: "Which CI environment is running the tests, used for FPD"
default: 'custom'
required: false
type: string
env:
REGISTRY: ghcr.io
jobs:
graphql:
if: inputs.library == 'golang' || inputs.library == 'nodejs' || inputs.library == 'ruby'
runs-on:
group: "APM Larger Runners"
strategy:
matrix:
weblog: ${{ fromJson(inputs.weblogs) }}
fail-fast: false
env:
SYSTEM_TESTS_REPORT_ENVIRONMENT: ${{ inputs.ci_environment }}
SYSTEM_TESTS_REPORT_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: 'DataDog/system-tests'
- name: Install runner
uses: ./.github/actions/install_runner
- name: Build proxy image
if: inputs.build_proxy_image
run: ./build.sh -i proxy
- name: Get binaries artifact
if : ${{ inputs.binaries_artifact != '' }}
uses: actions/download-artifact@v4
with:
name: ${{ inputs.binaries_artifact }}
path: binaries/
- name: Log in to the Container registry
if: ${{ inputs.library == 'ruby' }}
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin
- name: Build agent
run: SYSTEM_TEST_BUILD_ATTEMPTS=3 ./build.sh -i agent
- name: Build weblog
id: build
run: SYSTEM_TEST_BUILD_ATTEMPTS=3 ./build.sh ${{ inputs.library }} -i weblog -w ${{ matrix.weblog }}
- name: Run GRAPHQL_APPSEC scenario
run: ./run.sh GRAPHQL_APPSEC
- name: Compress logs
id: compress_logs
if: always() && steps.build.outcome == 'success'
run: tar -czvf artifact.tar.gz $(ls | grep logs)
- name: Upload artifact
if: always() && steps.compress_logs.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: logs_graphql_${{ inputs.library }}_${{ matrix.weblog }}_${{ inputs.ci_environment }}
path: artifact.tar.gz
# - name: Upload results CI Visibility
# if: always()
# run: ./utils/scripts/upload_results_CI_visibility.sh dev system-tests ${{ github.run_id }}-${{ github.run_attempt }}
# env:
# DD_API_KEY: ${{ secrets.DD_CI_API_KEY }}