fix #1191
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: quick-start | |
on: [push] | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Start docker containers | |
run: docker compose up -d --build | |
- name: Wait for migrations to finish | |
run: | | |
echo "Waiting for migrations to complete..." | |
until ! docker compose exec -T web src/manage.py showmigrations | grep -q '\[ \]'; do | |
echo "Migrations not finished, waiting..." | |
sleep 3 | |
done | |
- name: Show web-init logs | |
run: docker compose logs web-init | |
- name: Load fixtures | |
run: docker compose exec -T web src/manage.py loaddata demodata | |
- name: Create superuser | |
run: docker compose exec -T web src/manage.py createsuperuser --username admin --email admin@admin.nl --no-input | |
- name: Check main page | |
run: | | |
curl_status=$(curl -w '%{http_code}' -o /dev/null -s http://localhost:8000/) | |
if [[ $curl_status != 200 ]]; then | |
printf "Index page responds with ${curl_status} status.\r\n\r\n" >&2 | |
curl -i http://localhost:8000 | |
exit 1 | |
fi | |
- name: Check API endpoint | |
run: | | |
curl_status=$(curl -w '%{http_code}' -o /dev/null -s http://localhost:8000/api/v2/) | |
if [[ $curl_status != 200 ]]; then | |
printf "API ROOT page responds with ${curl_status} status.\r\n\r\n" >&2 | |
curl -i http://localhost:8000/api/v2/ | |
exit 1 | |
fi | |
- name: Check django-setup-configuration | |
run: docker compose exec -T web python -c "import django_setup_configuration" || { printf "django_setup_configuration package is not installed.\r\n\r\n" >&2; exit 1; } | |