Run Pytest (after code-quality) #47
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: Run Pytest (after code-quality) | |
| on: | |
| workflow_run: | |
| workflows: ["Python Code Quality Check"] | |
| types: [completed] | |
| jobs: | |
| test: | |
| runs-on: [ ubuntu-latest ] | |
| # Only run tests when the code-quality workflow passed. | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.workflow_run.head_sha }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' # Specify your required Python version | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install . | |
| pip install pytest | |
| - name: Run pytest | |
| run: | | |
| pytest -q tests |