update #43
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 Fast Tests on Push only | |
| on: | |
| push: | |
| branches: | |
| - 600-feature-improve-github-testing | |
| pull_request: | |
| branches: | |
| - dev | |
| jobs: | |
| fast-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -r rtd_requirements.txt | |
| pip install -e . | |
| pip install pytest-html | |
| - name: Run fast tests | |
| run: | | |
| python -m pytest -m "fast" -vv \ | |
| --durations=20 \ | |
| --junitxml=fast-report.xml \ | |
| --html=fast-report.html \ | |
| --self-contained-html \ | |
| > fast-output.txt 2>&1 | |
| - name: Upload fast test reports | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fast-test-reports | |
| path: | | |
| fast-report.xml | |
| fast-report.html | |
| fast-output.txt | |
| full-tests: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -r rtd_requirements.txt | |
| pip install -e . | |
| pip install pytest-html | |
| - name: Run full test suite | |
| run: | | |
| python -m pytest -vv \ | |
| --durations=20 \ | |
| --junitxml=full-report.xml \ | |
| --html=full-report.html \ | |
| --self-contained-html \ | |
| > full-output.txt 2>&1 | |
| - name: Upload full test reports | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: full-test-reports | |
| path: | | |
| full-report.xml | |
| full-report.html | |
| full-output.txt |