Duck 🦆 season #4157
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: 0 */6 * * * | |
pull_request: | |
branches: [main] | |
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: trunk-io/analytics-uploader@main | |
with: | |
# Path to your test results. | |
junit-paths: "**/*_test.xml" | |
# Provide your Trunk organization slug. | |
org-slug: trunk-staging-org | |
# Provide your Trunk API token as a GitHub secret. | |
token: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} | |
run: | |
pytest python/pytest/** --junitxml=python/results/pytest/pytest_test.xml -o | |
junit_family=xunit1 | |
env: | |
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io | |
- name: Run robotframework tests | |
uses: trunk-io/analytics-uploader@main | |
if: ${{ always() }} | |
with: | |
# Path to your test results. | |
junit-paths: "**/*_test.xml" | |
# Provide your Trunk organization slug. | |
org-slug: trunk-staging-org | |
# Provide your Trunk API token as a GitHub secret. | |
token: ${{ secrets.TRUNK_STAGING_ORG_API_TOKEN }} | |
run: | |
pabot --testlevelsplit --outputdir=python/results/robotframework --output=robot_test.xml | |
python/robotframework/** | |
env: | |
TRUNK_PUBLIC_API_ADDRESS: https://api.trunk-staging.io |