Skip to content

Update models, serializers, and tests for user registration #49

Update models, serializers, and tests for user registration

Update models, serializers, and tests for user registration #49

Workflow file for this run

# This is a basic GitHub Actions workflow for running CI tests on a Django project.
# It runs on Ubuntu 22.04 with 4 parallel jobs, caches system packages and Python dependencies,
# and checks out the repository with a fetch depth of 1. The build job sets the Python version to 3.10
# and runs the tests using the specified matrix. It is triggered on push or pull request events on the main branch,
# as well as manually using the workflow_dispatch event.
# For more information, see https://docs.github.com/en/actions/guides/building-and-testing-python#building-and-testing-python-with-multiple-versions
name: Django CI (basic)
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./apps/api
strategy:
max-parallel: 4
matrix:
python-version: ["3.10"]
steps:
- name: Cache system packages
uses: actions/[email protected]
with:
path: /var/cache/apt/archives
key: ${{ runner.os }}-apt-${{ hashFiles('apt.txt') }}
restore-keys: ${{ runner.os }}-apt-
- name: Cache python dependencies
uses: actions/[email protected]
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: |
python manage.py test afbcore.tests