Skip to content

Commit e646aaf

Browse files
authored
Add 3 github actions checks which were lost (#204)
This adds 3 already existing tox targets to github checks include code quality, dist verification, and qunit tests Because these do not fit in the django-python matrix these are added as separate jobs Getting them passing requires several requirements changes correct tox requirements.txt location update lib versions in that requirements file add deps to quality target, since pylint resolves imports Update tox whitelist to allowlist and include timeout for qunit Fix code quality failures a few whitespace points a warning about invalid related_name remove imports of classes that do not exist in tests DRY edits to Makefile remove pylint rcfile and use CLI options instead substantially changes code quality selections enabled
1 parent 5f357c2 commit e646aaf

File tree

9 files changed

+59
-493
lines changed

9 files changed

+59
-493
lines changed

.github/workflows/test.yml

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@ jobs:
7070
restore-keys: |
7171
${{ matrix.python-version }}-v1-
7272
73-
- name: Install Selenium dependencies
74-
run: |
75-
sudo apt-get -qq update
76-
sudo apt-get -y install firefox xvfb
77-
7873
- name: Install dependencies
7974
run: |
8075
python -m pip install --upgrade pip
@@ -90,3 +85,44 @@ jobs:
9085
uses: codecov/codecov-action@v2
9186
with:
9287
name: Python ${{ matrix.python-version }}
88+
89+
tox_checks:
90+
name: Run tox environment ${{ matrix.tox-env }}
91+
runs-on: ubuntu-latest
92+
strategy:
93+
fail-fast: false
94+
matrix:
95+
tox-env: ['quality', 'dist-validation']
96+
97+
steps:
98+
- uses: actions/checkout@v3
99+
- uses: actions/setup-python@v3
100+
101+
- name: Install dependencies
102+
run: |
103+
python -m pip install --upgrade pip
104+
python -m pip install --upgrade tox tox-gh-actions
105+
106+
- name: Tox tests
107+
run: tox -e ${{ matrix.tox-env }} -v
108+
109+
qunit:
110+
name: Visual tests
111+
runs-on: ubuntu-latest
112+
113+
steps:
114+
- uses: actions/checkout@v3
115+
- uses: actions/setup-python@v3
116+
117+
- name: Install Selenium dependencies
118+
run: |
119+
sudo apt-get -qq update
120+
sudo apt-get -y install firefox xvfb
121+
122+
- name: Install python dependencies
123+
run: |
124+
python -m pip install --upgrade pip
125+
python -m pip install --upgrade tox tox-gh-actions
126+
127+
- name: Tox tests
128+
run: tox -e qunit -v

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
.PHONY: quality requirements
22

3+
CHECK_DIRS?=example sortedm2m sortedm2m_tests test_project *.py
4+
35
quality: ## Run isort, pycodestyle, and Pylint
4-
isort --check-only --recursive .
5-
pycodestyle example sortedm2m sortedm2m_tests test_project *.py
6-
pylint --rcfile=pylintrc example sortedm2m sortedm2m_tests test_project *.py
6+
isort --check-only $(CHECK_DIRS)
7+
pycodestyle $(CHECK_DIRS)
8+
DJANGO_SETTINGS_MODULE=test_project.settings pylint --errors-only --load-plugins pylint_django $(CHECK_DIRS)
79

810
requirements: ## Install requirements for development
911
pip install -r requirements.txt

0 commit comments

Comments
 (0)