File tree Expand file tree Collapse file tree 5 files changed +114
-370
lines changed Expand file tree Collapse file tree 5 files changed +114
-370
lines changed Original file line number Diff line number Diff line change 1- name : Server testing
2-
31on :
42 push :
53 branches : [ main ]
4+ branches : [ '*' ] # Runs on any branch
65 pull_request :
76 branches : [ main ]
7+ branches : [ '*' ]
88
99jobs :
1010 test :
1111 runs-on : ubuntu-latest
12-
12+
1313 steps :
1414 - uses : actions/checkout@v3
1515 - name : Set up python
16+ - name : Set up Python
1617 uses : actions/setup-python@v3
1718 with :
1819 python-version : ' 3.9'
20+ python-version : ' 3.11'
1921
2022 - name : Install dependencies
2123 run : |
2224 python -m pip install --upgrade pip
23- pip install -r requirements.txt
25+ pip install -r server/ requirements.txt
2426 # - name: Run tests
2527 # run: |
2628 # python manage.py test
27-
29+
2830 - 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
2952 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