Rest API Python Tests #11320
This file contains hidden or 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 | |
| run-name: Rest API Python Tests | |
| on: | |
| schedule: | |
| - cron: "*/5 * * * *" | |
| workflow_dispatch: | |
| inputs: | |
| python_version: | |
| description: 'Python version' | |
| required: true | |
| default: '3.12' | |
| push: | |
| jobs: | |
| Run-Tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python version | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: '${{ github.event.inputs.python_version }}' | |
| - name: Run Tests | |
| run: | | |
| chmod +x -R ${{ github.workspace }} | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| export PYTHONPATH=${PYTHONPATH}:${{ github.workspace }} | |
| pytest -s tests/part_01/test_users.py --junitxml=results.xml --html=report.html | |
| - name: Publish Test Results | |
| uses: dorny/test-reporter@v3 | |
| if: success() || failure() | |
| with: | |
| name: Test Results | |
| path: results.xml | |
| reporter: java-junit | |
| - name: Create Test Summary | |
| uses: test-summary/action@dist | |
| if: success() || failure() | |
| with: | |
| paths: results.xml | |
| - name: Upload pytest Test Results | |
| uses: actions/upload-artifact@v7 | |
| if: success() || failure() | |
| with: | |
| name: test-results | |
| path: | | |
| results.xml | |
| report.html | |
| assets |