forked from torchbox/wagtailmedia
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (78 loc) · 2.35 KB
/
test.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
name: CI
on:
push:
pull_request:
# Current configuration:
# - django 2.2, python 3.6, wagtail 2.10
# - django 3.0, python 3.7, wagtail 2.11
# - django 3.1, python 3.8, wagtail 2.12
# - django 3.1, python 3.9, wagtail < 2.13
# - django 3.1, python 3.9, wagtail main (allow failures)
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: pre-commit/action@v2.0.0
test:
runs-on: ubuntu-latest
needs: lint
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
include:
- python: 3.6
django: "Django>=2.2,<2.3"
wagtail: "wagtail>=2.10,<2.11"
experimental: false
- python: 3.7
django: "Django>=3.0,<3.1"
wagtail: "wagtail>=2.11,<2.12"
experimental: false
- python: 3.8
django: "Django>=3.1,<3.2"
wagtail: "wagtail>=2.11,<2.13"
experimental: false
- python: 3.9
django: "Django>=3.1,<3.2"
wagtail: "wagtail>=2.11,<2.13"
experimental: false
- python: 3.9
django: "Django>=3.1,<3.2"
wagtail: "git+https://github.com/wagtail/wagtail.git@main#egg=wagtail"
experimental: true
services:
postgres:
image: postgres:10.8
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "psycopg2>=2.6"
pip install "${{ matrix.django }}"
pip install "${{ matrix.wagtail }}"
pip install -e .[testing]
- name: Test
run: |
coverage run runtests.py
env:
DATABASE_ENGINE: django.db.backends.postgresql
DATABASE_HOST: localhost
DATABASE_USER: postgres
DATABASE_PASS: postgres
- name: Upload coverage reports to Codecov
run: |
pip install codecov
codecov