File tree Expand file tree Collapse file tree 1 file changed +31
-6
lines changed Expand file tree Collapse file tree 1 file changed +31
-6
lines changed Original file line number Diff line number Diff line change 1
- name : Server testing
2
-
3
1
on :
4
2
push :
5
3
branches : [ main ]
4
+ branches : [ '*' ] # Runs on any branch
6
5
pull_request :
7
6
branches : [ main ]
7
+ branches : [ '*' ]
8
8
9
9
jobs :
10
10
test :
11
11
runs-on : ubuntu-latest
12
-
12
+
13
13
steps :
14
14
- uses : actions/checkout@v3
15
15
- name : Set up python
16
+ - name : Set up Python
16
17
uses : actions/setup-python@v3
17
18
with :
18
19
python-version : ' 3.9'
20
+ python-version : ' 3.11'
19
21
20
22
- name : Install dependencies
21
23
run : |
22
24
python -m pip install --upgrade pip
23
- pip install -r requirements.txt
25
+ pip install -r server/ requirements.txt
24
26
# - name: Run tests
25
27
# run: |
26
28
# python manage.py test
27
-
29
+
28
30
- name : Check for errors
31
+ if [ -f server/requirements.txt ]; then
32
+ python -m pip install --upgrade pip
33
+ pip install -r server/requirements.txt
34
+ else
35
+ echo "requirements.txt not found. Skipping dependency installation."
36
+ fi
37
+ - name : Run Django tests
38
+ run : |
39
+ if [ -f manage.py ]; then
40
+ python manage.py test
41
+ else
42
+ echo "manage.py not found. Skipping tests."
43
+ fi
44
+ - name : Run Django checks for errors
45
+ run : |
46
+ if [ -f manage.py ]; then
47
+ python manage.py check
48
+ else
49
+ echo "manage.py not found. Skipping Django checks."
50
+ fi
51
+ - name : Lint code
29
52
run : |
30
- python manage.py check
53
+ python manage.py check
54
+ pip install flake8
55
+ flake8 .
You can’t perform that action at this time.
0 commit comments