File tree Expand file tree Collapse file tree 5 files changed +99
-3
lines changed Expand file tree Collapse file tree 5 files changed +99
-3
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ jobs:
100
100
- name : Install Django ${{ matrix.django-version }}
101
101
run : poetry run pip install "django==${{ matrix.django-version }}"
102
102
- name : Test with pytest
103
- run : poetry run pytest --showlocals -vvv --cov-report=xml
103
+ run : poetry run pytest -n auto - -showlocals -vvv --cov-report=xml
104
104
- name : Upload coverage to Codecov
105
105
uses : codecov/codecov-action@v5
106
106
env :
Original file line number Diff line number Diff line change 1
- .PHONY : install test lint
1
+ .PHONY : install test test-dist lint
2
2
3
3
POETRY := $(shell command -v poetry 2> /dev/null)
4
4
9
9
10
10
test :
11
11
${POETRY} run pytest
12
+
13
+ test-dist :
14
+ ${POETRY} run pytest -n auto
Original file line number Diff line number Diff line change @@ -137,3 +137,39 @@ type Query {
137
137
fruits : [Fruit ! ]!
138
138
}
139
139
```
140
+
141
+ ## Contributing
142
+
143
+ We use [poetry ](https ://github .com /sdispater /poetry ) to manage dependencies , to
144
+ get started follow these steps :
145
+
146
+ ```shell
147
+ $ git clone https ://github .com /strawberry -graphql /strawberry -django
148
+ $ cd strawberry -django
149
+ $ python -m pip install poetry
150
+ $ make install
151
+ ```
152
+
153
+ ### Running tests
154
+
155
+ Using [ make] ( Makefile ) to run the tests:
156
+
157
+ ``` shell
158
+ $ make test
159
+ ```
160
+
161
+ To run tests in parallel:
162
+
163
+ ``` shell
164
+ $ make test-dist
165
+ ```
166
+
167
+ ### Pre commit
168
+
169
+ We have a configuration for
170
+ [ pre-commit] ( https://github.com/pre-commit/pre-commit ) , to add the hook run the
171
+ following command:
172
+
173
+ ``` shell
174
+ pre-commit install
175
+ ```
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ pytest-django = "^4.1.0"
55
55
pytest-mock = " ^3.5.1"
56
56
pytest-snapshot = " ^0.9.0"
57
57
pytest-watch = " ^4.2.0"
58
+ pytest-xdist = " ^3.8.0"
58
59
ruff = " ^0.12.1"
59
60
django-polymorphic = " ^3.1.0"
60
61
setuptools = " ^80.1.0"
You can’t perform that action at this time.
0 commit comments