Skip to content

feat(tests): setup test action #6

feat(tests): setup test action

feat(tests): setup test action #6

Workflow file for this run

name: Python Tests
on:
pull_request:
branches:
- staging
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install -r requirements.txt
- name: Set DJANGO_SETTINGS_MODULE environment variable
run:
echo "DJANGO_SETTINGS_MODULE=config.settings" >> $GITHUB_ENV
- name: Run tests with pytest
run: pytest
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
- name: Debug environment variables
run: echo $DATABASE_URL | awk '{print substr($0, 1, 4)}'