|
| 1 | +name: 🕵️ Test suite |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + schedule: |
| 6 | + # Run every Friday at 23:59 UTC |
| 7 | + - cron: 59 23 * * 5 |
| 8 | + |
| 9 | +jobs: |
| 10 | + linting: |
| 11 | + name: 📃 Code quality [pre-commit] |
| 12 | + runs-on: ubuntu-latest |
| 13 | + |
| 14 | + steps: |
| 15 | + - name: Checkout to Integration Test |
| 16 | + uses: actions/checkout@v2 |
| 17 | + |
| 18 | + - name: Setup python |
| 19 | + uses: actions/setup-python@v2 |
| 20 | + with: |
| 21 | + python-version: '3.8' |
| 22 | + architecture: 'x64' |
| 23 | + |
| 24 | + - name: pre-commit Checks |
| 25 | + run: | |
| 26 | + python -m pip install pre-commit |
| 27 | + pre-commit clean |
| 28 | + pre-commit run --all-files |
| 29 | +
|
| 30 | + - name: Analysis (git diff) |
| 31 | + if: failure() |
| 32 | + run: git diff |
| 33 | + |
| 34 | + tests: |
| 35 | + name: 🐍 Python-${{ matrix.python-version }} |
| 36 | + runs-on: ubuntu-18.04 |
| 37 | + strategy: |
| 38 | + matrix: |
| 39 | + python-version: [ 3.7, 3.8 ] |
| 40 | + |
| 41 | + steps: |
| 42 | + - name: Checkout to Integration Test |
| 43 | + uses: actions/checkout@v2 |
| 44 | + |
| 45 | + - name: Set up Python-${{ matrix.python-version }} |
| 46 | + uses: actions/setup-python@v2 |
| 47 | + with: |
| 48 | + python-version: ${{ matrix.python-version }} |
| 49 | + |
| 50 | + - name: Setup integration test with Python-${{ matrix.python-version }} |
| 51 | + run: | |
| 52 | + python -m pip install -U setuptools pip |
| 53 | + python -m cfme.scripting.quickstart |
| 54 | + cp conf/cfme_data.yaml.template conf/cfme_data.yaml |
| 55 | + cp conf/env.yaml.template conf/env.yaml |
| 56 | + cp conf/credentials.yaml.template conf/credentials.yaml |
| 57 | +
|
| 58 | + - name: Basic tests |
| 59 | + run: | |
| 60 | + source .cfme_venv/bin/activate |
| 61 | + pytest cfme/utils/tests cfme/modeling/tests requirements --dummy-appliance |
| 62 | + pytest -p no:cfme cfme/tests/test_modules_importable.py --dummy-appliance --long-running |
| 63 | +
|
| 64 | + - name: Test collection |
| 65 | + run: | |
| 66 | + source .cfme_venv/bin/activate |
| 67 | + pytest --dummy-appliance --collect-only --include-manual --long-running |
0 commit comments