kopia lustrzana https://github.com/wagtail/wagtail
Run Python tests with coverage and upload coverage data to codecov
rodzic
c1412685fd
commit
f1b30cc87c
|
@ -59,9 +59,14 @@ jobs:
|
||||||
pip install "${{ matrix.django }}"
|
pip install "${{ matrix.django }}"
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
./runtests.py
|
coverage run --parallel-mode --source wagtail runtests.py
|
||||||
env:
|
env:
|
||||||
DATABASE_ENGINE: django.db.backends.sqlite3
|
DATABASE_ENGINE: django.db.backends.sqlite3
|
||||||
|
- name: Upload coverage data
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: coverage-data
|
||||||
|
path: .coverage.*
|
||||||
|
|
||||||
test-postgres:
|
test-postgres:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -113,7 +118,7 @@ jobs:
|
||||||
${{ matrix.install_extras }}
|
${{ matrix.install_extras }}
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
./runtests.py
|
coverage run --parallel-mode --source wagtail runtests.py
|
||||||
env:
|
env:
|
||||||
DATABASE_ENGINE: django.db.backends.postgresql
|
DATABASE_ENGINE: django.db.backends.postgresql
|
||||||
DATABASE_HOST: localhost
|
DATABASE_HOST: localhost
|
||||||
|
@ -121,6 +126,11 @@ jobs:
|
||||||
DATABASE_PASSWORD: postgres
|
DATABASE_PASSWORD: postgres
|
||||||
USE_EMAIL_USER_MODEL: ${{ matrix.emailuser }}
|
USE_EMAIL_USER_MODEL: ${{ matrix.emailuser }}
|
||||||
DISABLE_TIMEZONE: ${{ matrix.notz }}
|
DISABLE_TIMEZONE: ${{ matrix.notz }}
|
||||||
|
- name: Upload coverage data
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: coverage-data
|
||||||
|
path: .coverage.*
|
||||||
|
|
||||||
test-mysql:
|
test-mysql:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -162,11 +172,16 @@ jobs:
|
||||||
pip install "${{ matrix.django }}"
|
pip install "${{ matrix.django }}"
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
./runtests.py
|
coverage run --parallel-mode --source wagtail runtests.py
|
||||||
env:
|
env:
|
||||||
DATABASE_ENGINE: django.db.backends.mysql
|
DATABASE_ENGINE: django.db.backends.mysql
|
||||||
DATABASE_HOST: '127.0.0.1'
|
DATABASE_HOST: '127.0.0.1'
|
||||||
DATABASE_USER: root
|
DATABASE_USER: root
|
||||||
|
- name: Upload coverage data
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: coverage-data
|
||||||
|
path: .coverage.*
|
||||||
|
|
||||||
# https://github.com/elastic/elastic-github-actions doesn't work for Elasticsearch 5,
|
# https://github.com/elastic/elastic-github-actions doesn't work for Elasticsearch 5,
|
||||||
# but https://github.com/getong/elasticsearch-action does
|
# but https://github.com/getong/elasticsearch-action does
|
||||||
|
@ -206,9 +221,14 @@ jobs:
|
||||||
pip install certifi
|
pip install certifi
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
./runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch5
|
coverage run --parallel-mode --source wagtail runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch5
|
||||||
env:
|
env:
|
||||||
DATABASE_ENGINE: django.db.backends.sqlite3
|
DATABASE_ENGINE: django.db.backends.sqlite3
|
||||||
|
- name: Upload coverage data
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: coverage-data
|
||||||
|
path: .coverage.*
|
||||||
|
|
||||||
test-sqlite-elasticsearch7:
|
test-sqlite-elasticsearch7:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -247,10 +267,15 @@ jobs:
|
||||||
pip install certifi
|
pip install certifi
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
./runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch7
|
coverage run --parallel-mode --source wagtail runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch7
|
||||||
env:
|
env:
|
||||||
DATABASE_ENGINE: django.db.backends.sqlite3
|
DATABASE_ENGINE: django.db.backends.sqlite3
|
||||||
USE_EMAIL_USER_MODEL: ${{ matrix.emailuser }}
|
USE_EMAIL_USER_MODEL: ${{ matrix.emailuser }}
|
||||||
|
- name: Upload coverage data
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: coverage-data
|
||||||
|
path: .coverage.*
|
||||||
|
|
||||||
# https://github.com/getong/elasticsearch-action doesn't work for Elasticsearch 6,
|
# https://github.com/getong/elasticsearch-action doesn't work for Elasticsearch 6,
|
||||||
# but https://github.com/elastic/elastic-github-actions does
|
# but https://github.com/elastic/elastic-github-actions does
|
||||||
|
@ -296,13 +321,18 @@ jobs:
|
||||||
pip install certifi
|
pip install certifi
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
./runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch6
|
coverage run --parallel-mode --source wagtail runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch6
|
||||||
env:
|
env:
|
||||||
DATABASE_ENGINE: django.db.backends.postgresql
|
DATABASE_ENGINE: django.db.backends.postgresql
|
||||||
DATABASE_HOST: localhost
|
DATABASE_HOST: localhost
|
||||||
DATABASE_USER: postgres
|
DATABASE_USER: postgres
|
||||||
DATABASE_PASSWORD: postgres
|
DATABASE_PASSWORD: postgres
|
||||||
USE_EMAIL_USER_MODEL: ${{ matrix.emailuser }}
|
USE_EMAIL_USER_MODEL: ${{ matrix.emailuser }}
|
||||||
|
- name: Upload coverage data
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: coverage-data
|
||||||
|
path: .coverage.*
|
||||||
|
|
||||||
test-postgres-elasticsearch7:
|
test-postgres-elasticsearch7:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -348,10 +378,54 @@ jobs:
|
||||||
pip install certifi
|
pip install certifi
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
./runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch7
|
coverage run --parallel-mode --source wagtail runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch7
|
||||||
env:
|
env:
|
||||||
DATABASE_ENGINE: django.db.backends.postgresql
|
DATABASE_ENGINE: django.db.backends.postgresql
|
||||||
DATABASE_HOST: localhost
|
DATABASE_HOST: localhost
|
||||||
DATABASE_USER: postgres
|
DATABASE_USER: postgres
|
||||||
DATABASE_PASSWORD: postgres
|
DATABASE_PASSWORD: postgres
|
||||||
USE_EMAIL_USER_MODEL: ${{ matrix.emailuser }}
|
USE_EMAIL_USER_MODEL: ${{ matrix.emailuser }}
|
||||||
|
- name: Upload coverage data
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: coverage-data
|
||||||
|
path: .coverage.*
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
needs:
|
||||||
|
- test-sqlite
|
||||||
|
- test-postgres
|
||||||
|
- test-mysql
|
||||||
|
- test-sqlite-elasticsearch5
|
||||||
|
- test-sqlite-elasticsearch7
|
||||||
|
- test-postgres-elasticsearch6
|
||||||
|
- test-postgres-elasticsearch7
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check out the repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install coverage
|
||||||
|
|
||||||
|
- name: Download coverage data
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: coverage-data
|
||||||
|
|
||||||
|
- name: Combine coverage data
|
||||||
|
run: |
|
||||||
|
coverage combine
|
||||||
|
coverage report -m --skip-covered
|
||||||
|
|
||||||
|
- name: Upload coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
flags: backend
|
||||||
|
|
|
@ -12,6 +12,7 @@ Changelog
|
||||||
* Officially recommend `fnm` over `nvm` in development documentation (LB (Ben) Johnston)
|
* Officially recommend `fnm` over `nvm` in development documentation (LB (Ben) Johnston)
|
||||||
* Test assertion util `WagtailPageTestCase.assertCanCreate` now supports the kwarg `publish=True` to check publish redirection (Harry Percival, Akua Dokua Asiedu)
|
* Test assertion util `WagtailPageTestCase.assertCanCreate` now supports the kwarg `publish=True` to check publish redirection (Harry Percival, Akua Dokua Asiedu)
|
||||||
* Mention the importance of passing `request` and `current_site` to `get_url` on the [performance](performance) documentation page (Jake Howard)
|
* Mention the importance of passing `request` and `current_site` to `get_url` on the [performance](performance) documentation page (Jake Howard)
|
||||||
|
* Run Python tests with coverage and upload coverage data to codecov (Sage Abdullah)
|
||||||
* Fix: Make sure workflow timeline icons are visible in high-contrast mode (Loveth Omokaro)
|
* Fix: Make sure workflow timeline icons are visible in high-contrast mode (Loveth Omokaro)
|
||||||
* Fix: Ensure authentication forms (login, password reset) have a visible border in Windows high-contrast mode (Loveth Omokaro)
|
* Fix: Ensure authentication forms (login, password reset) have a visible border in Windows high-contrast mode (Loveth Omokaro)
|
||||||
* Fix: Ensure visual consistency between buttons and links as buttons in Windows high-contrast mode (Albina Starykova)
|
* Fix: Ensure visual consistency between buttons and links as buttons in Windows high-contrast mode (Albina Starykova)
|
||||||
|
|
|
@ -22,6 +22,7 @@ depth: 1
|
||||||
* Upgrade to Node 18 for frontend build tooling (LB (Ben) Johnston)
|
* Upgrade to Node 18 for frontend build tooling (LB (Ben) Johnston)
|
||||||
* Officially recommend `fnm` over `nvm` in development documentation (LB (Ben) Johnston)
|
* Officially recommend `fnm` over `nvm` in development documentation (LB (Ben) Johnston)
|
||||||
* Mention the importance of passing `request` and `current_site` to `get_url` on the [performance](performance) documentation page (Jake Howard)
|
* Mention the importance of passing `request` and `current_site` to `get_url` on the [performance](performance) documentation page (Jake Howard)
|
||||||
|
* Run Python tests with coverage and upload coverage data to codecov (Sage Abdullah)
|
||||||
|
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue