-
Notifications
You must be signed in to change notification settings - Fork 123
153 lines (146 loc) · 4.95 KB
/
django-multitenant-tests.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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: "Django Multitenant Tests"
on:
pull_request:
types: [ opened, reopened, synchronize ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
static-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: actions/checkout@v3
- name: Install python dependencies
run: |
pip install -r requirements/static-analysis-requirements.txt
- name: Format Checks
run: |
make format-check
- name: Prospector checks
run: |
make lint
- name: Documentation Checks
run: |
cd docs
sphinx-build -W -b html source builds
tests-django-mt-lt-4_1:
runs-on: ubuntu-latest
name: "Python: ${{matrix.python_version}} | Django: ${{matrix.django_version}} | Citus: ${{matrix.citus_version}}"
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
python_version: ["3.8","3.9","3.10","3.11"]
django_version: ["3.2","4.0","4.1","4.2"]
citus_version: ["10","11","12"]
include:
- python_version: "3.7"
django_version: "3.2"
citus_version: "10"
- python_version: "3.7"
django_version: "3.2"
citus_version: "11"
- python_version: "3.7"
django_version: "3.2"
citus_version: "12"
exclude:
- python_version: "3.8"
django_version: "4.1"
citus_version: "10"
- python_version: "3.9"
django_version: "4.1"
citus_version: "10"
- python_version: "3.10"
django_version: "4.1"
citus_version: "10"
- python_version: "3.11"
django_version: "4.1"
citus_version: "10"
- python_version: "3.8"
django_version: "4.2"
citus_version: "10"
- python_version: "3.9"
django_version: "4.2"
citus_version: "10"
- python_version: "3.10"
django_version: "4.2"
citus_version: "10"
- python_version: "3.11"
django_version: "4.2"
citus_version: "10"
env:
PYTHON_VERSION: ${{ matrix.python_version }}
CITUS_VERSION: ${{ matrix.citus_version }}
DJANGO_VERSION: ${{ matrix.django_version }}
steps:
- uses: actions/checkout@v3
- name: Test Django MT
run: |
docker-compose --project-name django-multitenant up -d || { docker-compose logs && false ; }
echo "Running tests for python $PYTHON_VERSION, django $DJANGO_VERSION, citus $CITUS_VERSION"
docker run \
--entrypoint /build/scripts/test-django-mt.sh \
-v $(pwd):/build \
--network=host \
-e PYTHON_VERSION -e DJANGO_VERSION \
citusdata/python-all-versions
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
- name: Test Missing Modules
run: |
echo "Running tests for python $PYTHON_VERSION, django $DJANGO_VERSION, citus $CITUS_VERSION"
docker run \
--entrypoint /build/scripts/test-django-mt-modules.sh \
-v $(pwd):/build \
--network=host \
-e PYTHON_VERSION -e DJANGO_VERSION \
citusdata/python-all-versions
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
tests-django-mt-4_1:
runs-on: ubuntu-latest
name: "Python: ${{matrix.python_version}} | Django: ${{matrix.django_version}} | Citus: ${{matrix.citus_version}}"
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
python_version: ["3.8","3.9","3.10","3.11"]
django_version: ["4.1"]
citus_version: ["11"]
env:
PYTHON_VERSION: ${{ matrix.python_version }}
CITUS_VERSION: ${{ matrix.citus_version }}
DJANGO_VERSION: ${{ matrix.django_version }}
steps:
- uses: actions/checkout@v3
- name: Test Django MT
run: |
docker-compose --project-name django-multitenant up -d || { docker-compose logs && false ; }
echo "Running tests for python $PYTHON_VERSION, django $DJANGO_VERSION, citus $CITUS_VERSION"
docker run \
--entrypoint /build/scripts/test-django-mt.sh \
-v $(pwd):/build \
--network=host \
-e PYTHON_VERSION -e DJANGO_VERSION \
citusdata/python-all-versions
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
- name: Test Missing Modules
run: |
echo "Running tests for python $PYTHON_VERSION, django $DJANGO_VERSION, citus $CITUS_VERSION"
docker run \
--entrypoint /build/scripts/test-django-mt-modules.sh \
-v $(pwd):/build \
--network=host \
-e PYTHON_VERSION -e DJANGO_VERSION \
citusdata/python-all-versions
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3