Skip to content

Commit

Permalink
[maykinmedia/open-api-framework#104] Update quick-start.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmursa-dev committed Feb 4, 2025
1 parent 46640c0 commit e8cd10f
Showing 1 changed file with 12 additions and 27 deletions.
39 changes: 12 additions & 27 deletions .github/workflows/quick_start.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
name: quick-start

on: [push]
on:
push:
branches:
- master
pull_request:
branches:
- '**'
workflow_dispatch:

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Download docker-compose file
# todo replace branch name with master after the change is merge
run: wget https://raw.githubusercontent.com/maykinmedia/objecttypes-api/feature/merge-docker-composes/docker-compose.yml
- name: Start docker containers
run: docker compose up -d --no-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: 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" >&2
exit 1
fi
open-api-workflow-quick-start:
uses: maykinmedia/open-api-workflows/.github/workflows/quick-start.yml@feature/add-quick-start
with:
fixtures: 'demodata'

0 comments on commit e8cd10f

Please sign in to comment.