Attempt fix tests. Now use force_login instead of force_authenticate #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Django Tests | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: self-hosted | |
| env: | |
| DJANGO_SUPERUSER_USERNAME: admin | |
| DJANGO_SUPERUSER_PASSWORD: Password | |
| DJANGO_SETTINGS_MODULE: secfit.settings | |
| steps: | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| tool-cache: false | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| cd backend | |
| pip install -r requirements.txt | |
| - name: Run migrations | |
| run: | | |
| cd backend | |
| python manage.py migrate | |
| - name: Run tests | |
| run: | | |
| cd backend | |
| python manage.py test tests |