diff --git a/.github/workflows/test_suite.yml b/.github/workflows/test_suite.yml new file mode 100644 index 0000000000..cca8babc82 --- /dev/null +++ b/.github/workflows/test_suite.yml @@ -0,0 +1,68 @@ +name: 🕵️ Test suite + +on: + push: + pull_request: + schedule: + # Run every day at 23:59 UTC + - cron: 59 23 * * * + +jobs: + linting: + name: 📃 Code quality [pre-commit] + runs-on: ubuntu-latest + + steps: + - name: Checkout to Integration Test + uses: actions/checkout@v2 + + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: '3.7' + architecture: 'x64' + + - name: pre-commit Checks + run: | + python -m pip install pre-commit + pre-commit clean + pre-commit run --all-files + + - name: Analysis (git diff) + if: failure() + run: git diff + + tests: + name: 🐍 Python-${{ matrix.python-version }} + runs-on: ubuntu-18.04 + strategy: + matrix: + python-version: [ 3.7, 3.8 ] + + steps: + - name: Checkout to Integration Test + uses: actions/checkout@v2 + + - name: Set up Python-${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup integration test with Python-${{ matrix.python-version }} + run: | + python -m pip install -U setuptools pip + python -m cfme.scripting.quickstart + cp conf/cfme_data.yaml.template conf/cfme_data.yaml + cp conf/env.yaml.template conf/env.yaml + cp conf/credentials.yaml.template conf/credentials.yaml + + - name: Basic tests + run: | + source .cfme_venv/bin/activate + pytest cfme/utils/tests cfme/modeling/tests requirements --dummy-appliance + pytest -p no:cfme cfme/tests/test_modules_importable.py --dummy-appliance --long-running + + - name: Test collection + run: | + source .cfme_venv/bin/activate + pytest --dummy-appliance --collect-only --include-manual --long-running diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4b6f965bcf..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,83 +0,0 @@ -# https://docs.travis-ci.com/user/languages/python/#python-37-and-higher -dist: bionic -addons: - apt: - packages: - - python3 - - gcc - - gnutls-dev - - postgresql - - libxml2-dev - - libxslt1-dev - - libzmq3-dev - - libcurl4-openssl-dev - - g++ - - openssl - - libffi-dev - - python3-dev - - libtesseract-dev - - libpng-dev - - libfreetype6-dev - - libssl-dev - - python3-dbg - - git -language: python -python: - - '3.7' -stages: -- linting -- test -- deploy - -jobs: - include: - - stage: linting - python: '3.7' - env: - before_install: - - sudo apt-get update - install: - - pip install pre-commit flake8 - script: - - pre-commit clean - - pre-commit run --all-files - after_failure: - - git diff - - - stage: test - python: '3.7' - env: - # work around travis being missconfigured - - BOTO_CONFIG=/dev/null - install: - - pip3 install -U setuptools pip - - python3 -m cfme.scripting.quickstart --mk-virtualenv $HOME/virtualenv/python3.7 - # use templates for conf files necessary for collecting - - cp conf/cfme_data.yaml.template conf/cfme_data.yaml - - cp conf/env.yaml.template conf/env.yaml - - cp conf/credentials.yaml.template conf/credentials.yaml - script: - - pytest cfme/utils/tests cfme/modeling/tests requirements --dummy-appliance - - pytest -p no:cfme cfme/tests/test_modules_importable.py --dummy-appliance --long-running - - pytest --dummy-appliance --collect-only --include-manual --long-running - after_success: - - coveralls - - - stage: deploy - python: '3.7' - env: - install: pip install -U setuptools setuptools_scm pbr - script: skip - deploy: - provider: pypi - user: missing - password: ~ - distributions: sdist bdist_wheel - skip_upload_docs: true - on: - tags: true - repo: ManageIQ/integration_tests -cache: - directories: - - $HOME/.cache/pip - - $HOME/.cache/pre-commit