fix github actions #43
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: Wagtail Parler CI | |
on: [push, pull_request] | |
permissions: | |
pull-requests: write | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
matrix: | |
include: | |
- python: '3.9' | |
django: '"Django>=4.2,<4.3"' | |
wagtail: '"wagtail>=5.0,<5.1" "wagtail-modeladmin>=1.0,<2.0"' | |
coverage: 'py3.9_django-4.2_wagtail-5.0' | |
experimental: false | |
- python: '3.9' | |
django: '"Django>=4.2,<4.3"' | |
wagtail: '"wagtail>=5.1,<5.2" "wagtail-modeladmin>=1.0,<2.0"' | |
coverage: 'py3.9_django-4.2_wagtail-5.1' | |
experimental: false | |
- python: '3.11' | |
django: '"Django>=4.2,<4.3"' | |
wagtail: '"wagtail>=5.1,<5.2" "wagtail-modeladmin>=1.0,<2.0"' | |
coverage: 'py3.11_django-4.2_wagtail-5.1' | |
experimental: false | |
- python: '3.11' | |
django: '"Django>=4.2,<4.3"' | |
wagtail: '"wagtail>=5.2,<5.3" "wagtail-modeladmin>=1.0,<2.0"' | |
coverage: 'py3.11_django-4.2_wagtail-5.2' | |
experimental: false | |
- python: '3.11' | |
django: '"Django>=4.2,<4.3"' | |
wagtail: '"wagtail>=6.0,<6.1" "wagtail-modeladmin>=2.0,<3.0"' | |
coverage: 'py3.11_django-4.2_wagtail-6.0' | |
experimental: false | |
- python: '3.11' | |
django: '"Django>=4.2,<4.3"' | |
wagtail: '"wagtail>=6.1,<6.2" "wagtail-modeladmin>=2.0,<3.0"' | |
coverage: 'py3.11_django-4.2_wagtail-6.1' | |
experimental: false | |
- python: '3.11' | |
django: '"Django>=4.2,<4.3"' | |
wagtail: '"wagtail>=6.2,<6.3" "wagtail-modeladmin>=2.0,<3.0"' | |
coverage: 'py3.11_django-4.2_wagtail-6.2' | |
experimental: false | |
- python: '3.11' | |
django: '"git+https://github.com/django/django.git@main#egg=Django"' | |
wagtail: '"git+https://github.com/wagtail/wagtail.git@main#egg=wagtail" "wagtail-modeladmin>=1.0,<2.0"' | |
coverage: 'py3.11_django-main_wagtail-main' | |
experimental: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[testing] | |
pip install ${{ matrix.django }} | |
pip install ${{ matrix.wagtail }} | |
- name: Test | |
run: | | |
coverage run --parallel-mode ./runtests.py | |
mv .coverage.* .coverage.${{ matrix.coverage }} | |
- name: Upload coverage data | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-data-${{ matrix.coverage }} | |
path: .coverage.${{ matrix.coverage }} | |
include-hidden-files: true | |
if-no-files-found: error | |
qa: | |
needs: | |
- test | |
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 black flake8 mypy types-requests | |
- name: Check black | |
run: | | |
black --check ./ | |
- name: Check flake8 | |
run: | | |
flake8 | |
- name: Check mypy | |
run: | | |
mypy -p wagtail_parler | |
- name: Download coverage data | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: coverage-data-* | |
# - name: Check files | |
# run: | | |
# ls -la | |
- name: Save PR number and combine coverage data | |
run: | | |
mkdir -p ./pr | |
coverage combine | |
coverage report -m --format="markdown" > ./pr/coverage.md | |
coverage report --format="total" > ./pr/coverage_total | |
echo ${{ github.event.number }} > ./pr/NR | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pr | |
path: pr/ |