Skip to content

Added custom user model with customer user manager #36

Added custom user model with customer user manager

Added custom user model with customer user manager #36

Workflow file for this run

name: Run tests
on:
pull_request:
types: [opened, ready_for_review, synchronize, reopened]
jobs:
pytests:
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
steps:
- name: Cancel Previous Runs
if: "!endsWith(github.ref, '/master') && !endsWith(github.ref, '/dev')"
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/[email protected]
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.11"
architecture: "x64"
- name: Cache Poetry
id: cache-poetry
uses: actions/cache@v3
with:
path: ~/.poetry
key: ${{ matrix.os }}-poetry
# Only runs when key from caching step changes
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry
# Poetry still needs to be re-prepended to the PATH on each run, since
# PATH does not persist between runs.
- name: Add Poetry to $PATH
run: |
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Get Poetry version
run: poetry --version
- name: Check pyproject.toml validity
run: |
poetry check --no-interaction
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: ${{github.workspace}}/.venv
key: ${{ matrix.os }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ matrix.os }}-
- name: Install deps
if: steps.cache-deps.cache-hit != 'true'
run: |
poetry config virtualenvs.in-project true
poetry install --no-interaction
- name: Create .env file
run: |
echo "SECRET_KEY=default_secret_key" > .env
echo "DEBUG=False" >> .env
echo "ALLOWED_HOSTS=[]" >> .env
- name: Check Migrations
run: |
poetry run python manage.py makemigrations --check --dry-run
- name: Run pytest
run: |
poetry run pytest -vv