Python Tests #13614
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Tests | |
on: | |
schedule: | |
- cron: "*/6 * * * *" | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
inputs: | |
# trunk-ignore(checkov/CKV_GHA_7) | |
cli-version: | |
type: string | |
required: false | |
description: | |
The version of `analytics-cli` to use. Defaults to the latest specified in | |
`analytis-uploader`. | |
jobs: | |
test: | |
runs-on: public-amd64-small | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run pytest tests | |
uses: ./.github/actions/analytics-uploader-wrapper | |
with: | |
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} | |
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }} | |
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }} | |
token-dev2: ${{ secrets.TRUNK_DEV2_ORG_API_TOKEN }} | |
token-dev3: ${{ secrets.TRUNK_DEV3_ORG_API_TOKEN }} | |
token-dev4: ${{ secrets.TRUNK_DEV4_ORG_API_TOKEN }} | |
cli-version: ${{ inputs.cli-version }} | |
junit-paths: "**/*_test.xml" | |
run: | |
pytest python/pytest/** --junitxml=python/results/pytest/pytest_test.xml -o | |
junit_family=xunit1 | |
- name: Run robotframework tests | |
uses: ./.github/actions/analytics-uploader-wrapper | |
if: ${{ always() }} | |
with: | |
token-staging: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} | |
token-prod: ${{ secrets.TRUNK_PROD_ORG_API_TOKEN }} | |
token-dev: ${{ secrets.TRUNK_DEV_ORG_API_TOKEN }} | |
token-dev2: ${{ secrets.TRUNK_DEV2_ORG_API_TOKEN }} | |
token-dev3: ${{ secrets.TRUNK_DEV3_ORG_API_TOKEN }} | |
token-dev4: ${{ secrets.TRUNK_DEV4_ORG_API_TOKEN }} | |
cli-version: ${{ inputs.cli-version }} | |
junit-paths: "**/*_test.xml" | |
run: | |
pabot --testlevelsplit --outputdir=python/results/robotframework --output=robot_test.xml | |
python/robotframework/** |