mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2025-12-06 16:05:30 +00:00
* Update python.yaml
* Update release.yaml
* CP-2386 Add tests to Core.
* Revert "Update release.yaml"
This reverts commit ec93301496.
* Update python.yaml
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
name: Python CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
cache: 'pip'
|
|
|
|
- name: Install core module
|
|
run: pip install -e thousandeyes-sdk-core
|
|
|
|
- name: Install and test modules
|
|
run: |
|
|
pip install pytest
|
|
pip install coverage
|
|
|
|
# Initialize coverage data file
|
|
coverage erase
|
|
|
|
for module in $(find . -maxdepth 1 -type d -name "thousandeyes-sdk-*" | cut -c 3-); do
|
|
pip install -e $module
|
|
coverage run --source=$module -m pytest $module
|
|
# Move the .coverage file to a unique name
|
|
mv .coverage .coverage.$module
|
|
done
|
|
|
|
# Combine all .coverage files
|
|
coverage combine .coverage.*
|
|
coverage report
|
|
coverage xml
|
|
|
|
- name: Get Coverage
|
|
uses: orgoro/coverage@v3.2
|
|
with:
|
|
coverageFile: ./coverage.xml
|
|
thresholdAll: 0.4
|
|
thresholdNew: 0.6
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|