File tree Expand file tree Collapse file tree 5 files changed +119
-0
lines changed Expand file tree Collapse file tree 5 files changed +119
-0
lines changed Original file line number Diff line number Diff line change 26
26
- name : Run linters
27
27
run : |
28
28
pre-commit run --hook-stage=manual --all-files
29
+
29
30
docs :
30
31
name : Docs Checks
31
32
runs-on : ubuntu-latest
46
47
run : |
47
48
cd docs
48
49
make html
50
+ permissions :
51
+ contents : read
Original file line number Diff line number Diff line change
1
+ name : Linters
2
+
3
+ on :
4
+ pull_request :
5
+ workflow_dispatch :
6
+
7
+ concurrency :
8
+ group : ${{ github.workflow }}-${{ github.ref }}
9
+ cancel-in-progress : true
10
+
11
+ jobs :
12
+ lint :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+ with :
17
+ persist-credentials : false
18
+ - uses : actions/setup-python@v5
19
+ with :
20
+ python-version : ' 3.10'
21
+ cache : ' pip'
22
+ cache-dependency-path : ' pyproject.toml'
23
+ - name : Install Python dependencies
24
+ run : |
25
+ python -m pip install -U pip pre-commit
26
+ - name : Run linters
27
+ run : |
28
+ pre-commit run --hook-stage=manual --all-files
29
+ permissions :
30
+ contents : read
31
+
32
+ docs :
33
+ name : Docs Checks
34
+ runs-on : ubuntu-latest
35
+ steps :
36
+ - uses : actions/checkout@v4
37
+ with :
38
+ persist-credentials : false
39
+ - uses : actions/setup-python@v5
40
+ with :
41
+ cache : ' pip'
42
+ cache-dependency-path : ' pyproject.toml'
43
+ python-version : ' 3.10'
44
+ - name : Install dependencies
45
+ run : |
46
+ pip install -U pip
47
+ pip install -e ".[docs]"
48
+ - name : Build docs
49
+ run : |
50
+ cd docs
51
+ make html
52
+ permissions :
53
+ contents : read
Original file line number Diff line number Diff line change 54
54
run : bash .github/workflows/start_local_atlas.sh mongodb/mongodb-atlas-local:7
55
55
- name : Run tests
56
56
run : python3 django_repo/tests/runtests.py --settings mongodb_settings -v 2
57
+ permissions :
58
+ contents : read
Original file line number Diff line number Diff line change 55
55
mongodb-version : 6.0
56
56
- name : Run tests
57
57
run : python3 django_repo/tests/runtests_.py
58
+ permissions :
59
+ contents : read
Original file line number Diff line number Diff line change
1
+ name : Python Tests
2
+
3
+ on :
4
+ pull_request :
5
+ paths :
6
+ - ' **.py'
7
+ - ' !setup.py'
8
+ - ' .github/workflows/test-python.yml'
9
+ workflow_dispatch :
10
+
11
+ concurrency :
12
+ group : ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress : true
14
+
15
+ defaults :
16
+ run :
17
+ shell : bash -eux {0}
18
+
19
+ jobs :
20
+ build :
21
+ name : Django Test Suite
22
+ runs-on : ubuntu-latest
23
+ steps :
24
+ - name : Checkout django-mongodb-backend
25
+ uses : actions/checkout@v4
26
+ with :
27
+ persist-credentials : false
28
+ - name : install django-mongodb-backend
29
+ run : |
30
+ pip3 install --upgrade pip
31
+ pip3 install -e .
32
+ - name : Checkout Django
33
+ uses : actions/checkout@v4
34
+ with :
35
+ repository : ' mongodb-forks/django'
36
+ ref : ' mongodb-5.2.x'
37
+ path : ' django_repo'
38
+ persist-credentials : false
39
+ - name : Install system packages for Django's Python test dependencies
40
+ run : |
41
+ sudo apt-get update
42
+ sudo apt-get install libmemcached-dev
43
+ - name : Install Django and its Python test dependencies
44
+ run : |
45
+ cd django_repo/tests/
46
+ pip3 install -e ..
47
+ pip3 install -r requirements/py3.txt
48
+ - name : Copy the test settings file
49
+ run : cp .github/workflows/mongodb_settings.py django_repo/tests/
50
+ - name : Copy the test runner file
51
+ run : cp .github/workflows/runtests.py django_repo/tests/runtests_.py
52
+ - name : Start MongoDB
53
+ uses : supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0
54
+ with :
55
+ mongodb-version : 6.0
56
+ - name : Run tests
57
+ run : python3 django_repo/tests/runtests_.py
58
+ permissions :
59
+ contents : read
You can’t perform that action at this time.
0 commit comments