File tree Expand file tree Collapse file tree 7 files changed +71
-5
lines changed Expand file tree Collapse file tree 7 files changed +71
-5
lines changed Original file line number Diff line number Diff line change
1
+ name : Run Django tests
2
+ on :
3
+ push :
4
+ branches : [ "main" ]
5
+ pull_request :
6
+ branches : [ "main" ]
7
+ jobs :
8
+ lint :
9
+ runs-on : ubuntu-24.04
10
+ steps :
11
+ - name : Checkout
12
+ uses : actions/checkout@v4
13
+ - name : Setup Python
14
+
15
+ with :
16
+ # This should match the version used in production
17
+ python-version : " 3.12"
18
+ - name : Install dependencies
19
+ run : |
20
+ # Update pip
21
+ python -m pip install --upgrade pip
22
+ # https://pip.pypa.io/en/stable/cli/pip_install/
23
+ pip install --requirement requirements.txt
24
+ # https://docs.djangoproject.com/en/5.1/ref/django-admin/#check
25
+ - name : Run Django system checks
26
+ run : python manage.py check
27
+ # https://docs.djangoproject.com/en/5.1/topics/testing/
28
+ - name : Run Django test suites
29
+ run : |
30
+ export DJANGO_SECRET_KEY="$(python -c "import secrets; print(secrets.token_urlsafe())")"
31
+ python manage.py test
Original file line number Diff line number Diff line change
1
+ [ ![ Run Django checks] ( https://github.com/RSE-Sheffield/SORT/actions/workflows/django-check.yaml/badge.svg )] ( https://github.com/RSE-Sheffield/SORT/actions/workflows/django-check.yaml )
1
2
# SORT
2
3
### Self-Assessment of Organisational Readiness Tool
3
4
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import django .test
2
+
3
+
4
+ class HomeTestCase (django .test .TestCase ):
5
+
6
+ def test_welcome_page (self ):
7
+ """
8
+ Welcome page
9
+ """
10
+ self .client .get ("/" )
Original file line number Diff line number Diff line change
1
+ import django .test
2
+
3
+
4
+ class ProjectTestCase (django .test .TestCase ):
5
+
6
+ def test_projects_page (self ):
7
+ """
8
+ Test the profiles list page.
9
+ """
10
+ self .client .get ("/projects" )
Original file line number Diff line number Diff line change
1
+ import django .test
2
+
3
+
4
+ class UserTestCase (django .test .TestCase ):
5
+
6
+ def test_profile_page (self ):
7
+ """
8
+ Test the user profile page
9
+ """
10
+ self .client .get ("/profile" )
Original file line number Diff line number Diff line change 1
- # from django.test import TestCase
1
+ import django .test
2
2
3
- # Create your tests here.
3
+
4
+ class InviteTestCase (django .test .TestCase ):
5
+
6
+ def test_invite_page (self ):
7
+ """
8
+ Send out invitation page.
9
+ """
10
+ self .client .get ("/invite/" )
You can’t perform that action at this time.
0 commit comments