-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Card ID: CCT-364 Start running our small test suite when PR is opened or updated. (Adapted from 397fe6f)
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
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@v4 | ||
|
||
- 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 |