From 75ead85518a639d8d15a25f2e42c0dfab30e2a9d Mon Sep 17 00:00:00 2001 From: Charles de Beauchesne Date: Mon, 7 Feb 2022 14:24:20 +0100 Subject: [PATCH] ci: add system tests in CI (#3206) Add [system tests](https://github.com/DataDog/system-tests) in CI. System tests is a functional test suite that spawns tracer and agent, run some typical scenario, and then ensure that everything that should happen between tracer/agent/backend really happen. As now, the coverage is mainly on appsec features, but almost everything that have a visible effect on tracer/agent surface (*ie* traffic, logs, stdout...) can be tested. --- .github/workflows/system-tests.yml | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/system-tests.yml diff --git a/.github/workflows/system-tests.yml b/.github/workflows/system-tests.yml new file mode 100644 index 00000000000..a3404d8d1d5 --- /dev/null +++ b/.github/workflows/system-tests.yml @@ -0,0 +1,54 @@ +name: System Tests + +on: + pull_request: + workflow_dispatch: {} + schedule: + - cron: '00 04 * * 2-6' + push: + branches: + - master + +jobs: + system-tests: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - weblog-variant: flask-poc + - weblog-variant: uwsgi-poc + - weblog-variant: django-poc + fail-fast: false + env: + TEST_LIBRARY: python + WEBLOG_VARIANT: ${{ matrix.weblog-variant }} + DD_API_KEY: ${{ secrets.DD_API_KEY }} + steps: + - name: Checkout system tests + uses: actions/checkout@v2 + with: + repository: 'DataDog/system-tests' + + - name: Checkout dd-trace-py + uses: actions/checkout@v2 + with: + path: 'binaries/dd-trace-py' + + - name: Build + run: ./build.sh + + - name: Run + run: ./run.sh + + # even on failures, we want to have artifact to be able to investigate + # The compress step speed up a lot the uplaod artifact process + - name: Compress artifact + if: ${{ always() }} + run: tar -czvf artifact.tar.gz $(ls | grep logs) + + - name: Upload artifact + uses: actions/upload-artifact@v2 + if: ${{ always() }} + with: + name: logs_${{ matrix.weblog-variant }} + path: artifact.tar.gz