Fix register user #104
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
# GitHub Actions | |
# This workflow will prepare the testing environment and run test cases | |
name: Django Backend Test | |
on: [pull_request, push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
if [ -f optional-requirements.txt ]; then pip install -r optional-requirements.txt; fi | |
- name: Setup environment and settings | |
run: | | |
cp ./npsat_backend/local_settings_template.py ./npsat_backend/local_settings.py | |
cp ./npsat_backend/databases_template.py ./npsat_backend/databases.py | |
mkdir ../logs | |
- name: Run migrations | |
run: | | |
python manage.py makemigrations | |
python manage.py migrate | |
- name: Run tests | |
run: python manage.py test |