Skip to content

Commit

Permalink
[ci] Combine coverage for different test runs
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Aug 1, 2024
1 parent c49c1f7 commit 7157a04
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- master

jobs:

build:
name: Python==${{ matrix.python-version }} | ${{ matrix.django-version }}
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -56,7 +55,7 @@ jobs:
id: deps
run: |
sudo apt update
sudo apt-get -qq -y install sqlite3 gdal-bin libproj-dev \
sudo apt -qq -y install sqlite3 gdal-bin libproj-dev \
libgeos-dev libspatialite-dev spatialite-bin \
libsqlite3-mod-spatialite
sudo npm install -g jshint stylelint
Expand All @@ -75,10 +74,10 @@ jobs:
# the following command runs tests with Postgres/PostGIS but
# only for specific test cases which are tagged with "db_tests"
POSTGRESQL=1 coverage run runtests.py --parallel --keepdb
# tests the extension capability
SAMPLE_APP=1 coverage run ./runtests.py --parallel --keepdb
coverage combine
coverage xml
# tests the extension capability
SAMPLE_APP=1 ./runtests.py --keepdb
env:
SELENIUM_HEADLESS: 1

Expand Down
28 changes: 13 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
[tool.coverage.run]
source = ["openwisp_controller"]
parallel = true
concurrency = ["multiprocessing"]
omit = [
"openwisp_controller/__init__.py",
"*/tests/*",
"*/migrations/*",
]

[tool.docstrfmt]
extend_exclude = ["**/*.py", "README.rst"]

[tool.isort]
known_third_party = ["django", "django_x509"]
known_first_party = ["openwisp_users", "openwisp_utils"]
Expand All @@ -7,18 +20,3 @@ multi_line_output = 3
use_parentheses = true
include_trailing_comma = true
force_grid_wrap = 0

[tool.coverage.run]
parallel = true
omit = [
"**/test*",
"tests",
"**/__init__.py",
"setup.py",
"**/migrations/*"
]
source = ["openwisp_controller"]
concurrency = ["multiprocessing"]

[tool.docstrfmt]
extend_exclude = ["**/*.py", "README.rst"]

0 comments on commit 7157a04

Please sign in to comment.