Skip to content

Commit

Permalink
[maykinmedia/open-api-framework#96] Add quick-start.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmursa-dev committed Feb 3, 2025
1 parent da504f5 commit 2090134
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/quick-start.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: quick-start

on:
workflow_call:

jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Start docker containers
run: docker compose up -d --build || ( docker compose logs >&2 && exit 1; )
- 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 [email protected] --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

0 comments on commit 2090134

Please sign in to comment.