Add pytest into CI for RHEL 7 branch #5
Workflow file for this run
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: pytest | |
on: | |
pull_request: | |
paths: | |
- "src/**" | |
jobs: | |
pytest: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: "CentOS 7" | |
image: "quay.io/centos/centos:7" | |
runs-on: "ubuntu-latest" | |
container: | |
image: ${{ matrix.image }} | |
steps: | |
- name: "Checkout the repository" | |
uses: actions/checkout@v3 | |
- name: "Install dependencies" | |
# We can't run 'pip install' over the core repo, pip 20 doesn't understand the 'extras_require' in its setup.py | |
run: | | |
yum install -y epel-release git-core | |
yum install -y python-pip | |
python -m pip install --upgrade 'pip<21' | |
python -m pip install -r src/insights_client/tests/requirements.txt | |
git clone https://github.com/RedHatInsights/insights-core.git /tmp/egg | |
- name: "Run pytest" | |
env: | |
PYTEST_ADDOPTS: "--color=yes --code-highlight=yes --showlocals" | |
PYTHONPATH: "src/:/tmp/egg/" | |
EGG: "/tmp/egg/" | |
BYPASS_GPG: "true" | |
run: | | |
python -m pytest src/insights_client/tests |