Skip to content

Pytest stats to Datadog #248

Pytest stats to Datadog

Pytest stats to Datadog #248

Workflow file for this run

name: Pytest stats to Datadog
on:
workflow_dispatch:
schedule:
- cron: "0 12 * * 1-5"
jobs:
send-test-stats:
name: Send E2E test stats to datadog
if: github.repository == 'kili-technology/kili-python-sdk'
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
pip install --upgrade pip
pip install datadog pandas requests tqdm
- name: Fetch script from main
run: curl https://raw.githubusercontent.com/kili-technology/kili-python-sdk/main/.github/scripts/upload_test_stats_datadog.py --output upload_test_stats_datadog.py
- name: Fetch data from github CI logs
run: python upload_test_stats_datadog.py fetch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Send data to datadog
run: python upload_test_stats_datadog.py upload
env:
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
DATADOG_APP_KEY: ${{ secrets.DATADOG_APP_KEY }}