Let's see if this fixes the CI #40
This file contains hidden or 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: | |
push: | |
branches: | |
- master | |
- dev | |
pull_request: | |
branches: | |
- master | |
- dev | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
environment: master_secrets | |
env: | |
SECRET_KEY: ${{ secrets.SECRET_KEY }} | |
DEBUG: ${{ vars.DEBUG }} | |
ALLOWED_HOSTS: ${{ vars.ALLOWED_HOSTS }} | |
TIME_ZONE: ${{ vars.TIME_ZONE }} | |
INTERNAL_IPS: ${{ vars.INTERNAL_IPS }} | |
SITE_URL: ${{ vars.SITE_URL }} | |
ALLOW_REGISTRATION: ${{ vars.ALLOW_REGISTRATION }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
pip install -r requirements.txt | |
- name: Ensure data directory exists | |
run: mkdir -p ./data | |
- name: Run migrations | |
run: | | |
source venv/bin/activate | |
python manage.py makemigrations --noinput | |
python manage.py migrate --noinput | |
- name: Run tests | |
run: | | |
source venv/bin/activate | |
python manage.py test --parallel --noinput |