Skip to content

Run Tests

Run Tests #3160

Workflow file for this run

name: Run Tests
permissions:
checks: write
contents: read
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
- reopened
- ready_for_review
schedule:
# every hour, 9-5 eastern, M-F
- cron: '45 12-21 * * 1-5'
env:
DD_DESTINATION_API_KEY: ${{ secrets.DD_DESTINATION_API_KEY }}
DD_DESTINATION_APP_KEY: ${{ secrets.DD_DESTINATION_APP_KEY }}
DD_DESTINATION_API_URL: ${{ secrets.DD_DESTINATION_API_URL }}
DD_SOURCE_API_KEY: ${{ secrets.DD_SOURCE_API_KEY }}
DD_SOURCE_APP_KEY: ${{ secrets.DD_SOURCE_APP_KEY }}
DD_SOURCE_API_URL: ${{ secrets.DD_SOURCE_API_URL }}
jobs:
test:
strategy:
matrix:
os: [ubuntu-24.04-arm, ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
with:
python-version: 3.12
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install tox
run: pip install tox
- name: Run ruff
run: tox -e ruff
- name: Run unit tests
run: tox -e py312
build_artifacts:
name: Build and test executables
continue-on-error: true
strategy:
matrix:
os: [ubuntu-24.04-arm, ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
with:
python-version: "3.12"
- name: Install requirements
run: |
python -m pip install .
python -m pip install -r scripts/build_requirements.txt
- name: Build and upload executables
run: python scripts/build.py -f -n datadog-sync
- name: Run executable
shell: bash
run: |
dist/datadog-sync diffs --validate=false --verify-ddr-status=false
exit $?