-
Notifications
You must be signed in to change notification settings - Fork 3
124 lines (110 loc) · 3.4 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Wagtail Parler CI
on: [push, pull_request]
permissions:
pull-requests: write
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Current configuration:
# - python 3.7, django 3.2, wagtail 4.1
# - python 3.7, django 3.2, wagtail 4.2
# - python 3.7, django 3.2, wagtail 5.0
# - python 3.9, django 4.2, wagtail 5.0
# - python 3.9, django 4.2, wagtail 5.1
# - python 3.11, django 4.2, wagtail 5.1
# - python 3.11, django main, wagtail main
jobs:
test:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
include:
- python: '3.7'
django: 'Django>=3.2,<3.3'
wagtail: 'wagtail>=4.1,<4.2'
experimental: false
- python: '3.7'
django: 'Django>=3.2,<3.3'
wagtail: 'wagtail>=4.2,<4.3'
experimental: false
- python: '3.7'
django: 'Django>=3.2,<3.3'
wagtail: 'wagtail>=5.0,<5.1'
experimental: false
- python: '3.9'
django: 'Django>=4.2,<4.3'
wagtail: 'wagtail>=5.0,<5.1'
experimental: false
- python: '3.9'
django: 'Django>=4.2,<4.3'
wagtail: 'wagtail>=5.1,<5.2'
experimental: false
- python: '3.11'
django: 'Django>=4.2,<4.3'
wagtail: 'wagtail>=5.1,<5.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'
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
- name: Upload coverage data
uses: actions/upload-artifact@v3
with:
name: coverage-data
path: .coverage.*
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@v3
with:
name: coverage-data
- 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@v2
with:
name: pr
path: pr/