Make the template project compatible with startproject #17
Workflow file for this run
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: Start Project | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
creates-valid-project: | |
runs-on: ubuntu-latest | |
if: ${{ !contains(github.event.head_commit.message, '#skipci') }} | |
services: | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_USER: dev | |
POSTGRES_PASSWORD: dev_password | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Allows us to use the same env config used locally by mapping to port to | |
# the test runner container. | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
# Project System Dependencies | |
sudo apt-get install -y \ | |
build-essential \ | |
libffi-dev \ | |
libpq-dev | |
# Playwright System Dependencies | |
sudo apt-get install -y \ | |
libnss3\ | |
libnspr4\ | |
libatk1.0-0\ | |
libatk-bridge2.0-0\ | |
libcups2\ | |
libdrm2\ | |
libxkbcommon0\ | |
libatspi2.0-0\ | |
libxcomposite1\ | |
libxdamage1\ | |
libxfixes3\ | |
libxrandr2\ | |
libgbm1\ | |
libasound2 | |
pip install django poetry invoke | |
- name: Create project | |
run: | | |
django-admin startproject \ | |
--template template/ \ | |
--extension py,Dockerfile,env,toml,yml \ | |
test_project | |
- name: Install Project | |
run: | | |
cd test_project | |
poetry install | |
poetry run playwright install | |
- name: Check Project | |
run: | | |
cd test_project | |
cp example.env .env | |
invoke check |