Regression Testing #951
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: Regression Testing | |
on: | |
schedule: | |
- cron: 0 0 * * * | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
max-parallel: 1 | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.7", "3.8", "3.9", "3.10"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Run normal tests | |
run: pytest -s -rs | |
- name: Run API tests | |
run: pytest -s tests/components/api/test_clients.py | |
env: | |
QC_USER_ID: ${{ secrets.QC_USER_ID }} | |
QC_API_TOKEN: ${{ secrets.QC_API_TOKEN }} | |
# CLI tests call the CLI itself, which requires Docker, so we can only run it on Linux because: | |
# - GitHub Actions doesn't support Docker on macOS: | |
# https://github.community/t/is-it-possible-to-install-and-configure-docker-on-macos-runner/16981/7 | |
# - GitHub Actions only supports Windows-based Docker containers on Windows: | |
# https://github.com/actions/virtual-environments/issues/1143 | |
# | |
# Before running the tests we free up some disk space to prevent issues. | |
# Removing /usr/local/lib/android frees up ~10GB, which we can safely do because we don't use Android. | |
- name: Run CLI tests | |
run: sudo rm -rf /usr/local/lib/android && pytest -s tests/test_cli.py | |
if: runner.os == 'Linux' | |
env: | |
QC_USER_ID: ${{ secrets.QC_USER_ID }} | |
QC_API_TOKEN: ${{ secrets.QC_API_TOKEN }} |