Skip to content

Commit 2124de5

Browse files
authored
[ci-chore] Add system tests to our pipeline (#81)
1 parent 7c817c9 commit 2124de5

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.circleci/config.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,52 @@ jobs:
7373
- "d3:8f:a8:6e:b6:ef:37:65:1a:dc:2b:88:3b:ff:50:f4"
7474
- run: bin/publish-coverage
7575

76+
# Copy-pasta from dd-trace-java. Thank you <3
77+
system-tests:
78+
parameters:
79+
systemTestsCommit:
80+
type: string
81+
default: main
82+
machine:
83+
image: ubuntu-2004:current
84+
resource_class: large
85+
steps:
86+
- run:
87+
name: Install python 3.9
88+
command: |
89+
sudo apt-get install python3.9-full python3.9-dev python3.9-venv
90+
echo 'export PATH="$HOME/.local/bin:$PATH"' >>"$BASH_ENV"
91+
- run:
92+
name: Clone system-tests
93+
command: |
94+
git init system-tests
95+
cd system-tests
96+
git remote add origin https://github.com/DataDog/system-tests.git
97+
git fetch origin << parameters.systemTestsCommit >>
98+
git reset --hard FETCH_HEAD
99+
- run:
100+
name: Install requirements
101+
command: |
102+
cd system-tests
103+
pyenv local system
104+
python3.9 --version
105+
python3.9 -m pip install wheel
106+
python3.9 -m pip install -r requirements.txt
107+
sudo ln -sf /usr/bin/python3.9 /usr/bin/python
108+
- run:
109+
name: Run
110+
environment:
111+
TEST_LIBRARY: cpp
112+
DD_TRACE_CPP_COMMIT: << pipeline.git.revision >>
113+
command: cd system-tests && ./build.sh -i runner && ./run.sh PARAMETRIC --log-cli-level=DEBUG
114+
- run:
115+
name: Collect artifacts
116+
command: tar -cvzf logs_cpp_parametric_dev.tar.gz -C system-tests logs_parametric
117+
- store_test_results:
118+
path: system-tests/logs_parametric
119+
- store_artifacts:
120+
path: logs_cpp_parametric_dev.tar.gz
121+
76122
workflows:
77123
pull-request:
78124
jobs:
@@ -90,3 +136,8 @@ workflows:
90136
arch: ["amd64", "arm64"]
91137
toolchain: ["gnu", "llvm"]
92138
- coverage
139+
- system-tests:
140+
filters:
141+
branches:
142+
only:
143+
- main

0 commit comments

Comments
 (0)