2023 dec #88
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
name: Django Tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
- develop | |
jobs: | |
python_lint: | |
name: Linting | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout PR | |
uses: actions/checkout@v2 | |
- name: Setup Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install flake8 | |
run: pip install flake8 | |
- name: Lint | |
run: flake8 | |
continue-on-error: true | |
run_tests: | |
name: Run Django tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout PR | |
uses: actions/checkout@v2 | |
- name: Setup Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install pip | |
run: pip install -U setuptools pip | |
- name: Install django | |
run: | | |
pip install -q Django==4.2 | |
pip install dj_database_url | |
pip install . | |
- name: Run tests | |
run: PYTHONPATH=.:./app:./app/shop DJANGO_SETTINGS_MODULE=app.settings django-admin test |