Skip to content

edit test

edit test #3

Workflow file for this run

name: Django CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Run tests and check code quality
runs-on: ubuntu-latest
# Remove the strategy matrix to run the job sequentially
# strategy:
# matrix:
# python-version: [ 3.11 ]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Set up environment variables
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: |
echo "DATABASE_NAME=$DATABASE_NAME" >> $GITHUB_ENV
echo "DATABASE_USER=$DATABASE_USER" >> $GITHUB_ENV
echo "DATABASE_PASSWORD=$DATABASE_PASSWORD" >> $GITHUB_ENV
echo "DATABASE_HOST=$DATABASE_HOST" >> $GITHUB_ENV
# - name: Prepare database
# run: |
# python manage.py migrate --no-input
# python manage.py collectstatic --no-input
- name: Run tests
run: python project/manage.py test --no-input