11
11
12
12
jobs :
13
13
build_3_8_9_10_11_django_3_2 :
14
- name : Build on Python 3.8, 3.9, 3.10, 3.11 django 3.2
14
+ name : Build on Python ${{ matrix.python-version }} and django 3.2
15
15
runs-on : ubuntu-latest
16
16
strategy :
17
17
matrix :
18
- python-version : ['3.8', '3.9', '3.10', '3.11']
18
+ python-version : ['3.7', '3. 8', '3.9', '3.10', '3.11']
19
19
steps :
20
20
- name : Checkout
21
- uses : actions/checkout@v2
21
+ uses : actions/checkout@v3
22
22
with :
23
23
fetch-depth : 0
24
24
- name : Set up Python ${{ matrix.python-version }}
25
- uses : actions/setup-python@v2
25
+ uses : actions/setup-python@v4
26
26
with :
27
27
python-version : ${{ matrix.python-version }}
28
28
- name : Install dependencies
29
29
run : |
30
30
python -m pip install --upgrade pip
31
- pip install -r requirements/dev.txt
32
- pip install -r requirements/test.txt
33
- pip install pytest-cov
34
- pip install django==3.2.*
31
+ pip install poetry
32
+ poetry install
33
+ poetry run pip install django==3.2.*
35
34
- name : Linting
36
35
run : |
37
- flake8
36
+ poetry run flake8
38
37
- name : Testing
39
38
run : |
40
- python setup.py test
39
+ poetry run pytest
41
40
build_3_10_django_4_0 :
42
41
name : Build on Python 3.10 django 4.0
43
42
runs-on : ubuntu-latest
@@ -46,52 +45,77 @@ jobs:
46
45
python-version : ['3.10']
47
46
steps :
48
47
- name : Checkout
49
- uses : actions/checkout@v2
48
+ uses : actions/checkout@v3
50
49
with :
51
50
fetch-depth : 0
52
51
- name : Set up Python ${{ matrix.python-version }}
53
- uses : actions/setup-python@v2
52
+ uses : actions/setup-python@v4
54
53
with :
55
54
python-version : ${{ matrix.python-version }}
56
55
- name : Install dependencies
57
56
run : |
58
57
python -m pip install --upgrade pip
59
- pip install -r requirements/dev.txt
60
- pip install -r requirements/test.txt
61
- pip install pytest-cov
62
- pip install django==4.0.*
58
+ pip install poetry
59
+ poetry install
60
+ poetry run pip install django==4.0.*
63
61
- name : Linting
64
62
run : |
65
- flake8
63
+ poetry run flake8
66
64
- name : Testing
67
65
run : |
68
- python setup.py test
66
+ poetry run pytest
67
+ build_3_10_django_4_1 :
68
+ name : Build on Python 3.10 django 4.1
69
+ runs-on : ubuntu-latest
70
+ strategy :
71
+ matrix :
72
+ python-version : ['3.10']
73
+ steps :
74
+ - name : Checkout
75
+ uses : actions/checkout@v3
76
+ with :
77
+ fetch-depth : 0
78
+ - name : Set up Python ${{ matrix.python-version }}
79
+ uses : actions/setup-python@v4
80
+ with :
81
+ python-version : ${{ matrix.python-version }}
82
+ - name : Install dependencies
83
+ run : |
84
+ python -m pip install --upgrade pip
85
+ pip install poetry
86
+ poetry install
87
+ poetry run pip install django==4.1.*
88
+ - name : Linting
89
+ run : |
90
+ poetry run flake8
91
+ - name : Testing
92
+ run : |
93
+ poetry run pytest
69
94
sonar :
70
95
name : Sonar Checks
71
- needs : [build_3_8_9_10_11_django_3_2, build_3_10_django_4_0]
96
+ needs : [build_3_8_9_10_11_django_3_2, build_3_10_django_4_0, build_3_10_django_4_1 ]
72
97
runs-on : ubuntu-latest
73
98
steps :
74
99
- name : Checkout
75
- uses : actions/checkout@v2
100
+ uses : actions/checkout@v3
76
101
with :
77
102
fetch-depth : 0
78
103
- name : Set up Python '3.10'
79
- uses : actions/setup-python@v2
104
+ uses : actions/setup-python@v4
80
105
with :
81
106
python-version : ' 3.10'
82
107
- name : Install dependencies
83
108
run : |
84
109
python -m pip install --upgrade pip
85
- pip install -r requirements/dev.txt
86
- pip install -r requirements/test.txt
87
- pip install pytest-cov
88
- pip install django==4.0.*
110
+ pip install poetry
111
+ poetry install
112
+ poetry run pip install django==4.0.*
89
113
- name : Testing
90
114
run : |
91
- python setup.py test
115
+ poetry run pytest
92
116
- name : Fix coverage report for Sonar
93
117
run : |
94
- sed -i 's/\/home\/runner\/work\/django-cqrs\/django-cqrs\//\/github\/workspace\//g' coverage.xml
118
+ sed -i 's/\/home\/runner\/work\/django-cqrs\/django-cqrs\//\/github\/workspace\//g' ./tests/reports/ coverage.xml
95
119
- name : SonarCloud
96
120
uses : SonarSource/sonarcloud-github-action@master
97
121
env :
@@ -112,11 +136,11 @@ jobs:
112
136
runs-on : ubuntu-latest
113
137
steps :
114
138
- name : Checkout
115
- uses : actions/checkout@v2
139
+ uses : actions/checkout@v3
116
140
with :
117
141
fetch-depth : 0
118
142
- name : Set up Python '3.10'
119
- uses : actions/setup-python@v2
143
+ uses : actions/setup-python@v4
120
144
with :
121
145
python-version : ' 3.10'
122
146
- name : Integration tests
0 commit comments