Rest API Python Tests #11253
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: | |
| push: | |
| jobs: | |
| Run-Tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: 3.12 | |
| - 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@v3 | |
| if: success() || failure() | |
| with: | |
| name: test-results | |
| path: | | |
| results.xml | |
| report.html | |
| assets |