From 781679dbbdc96d030153b3580c912fcc5ac473ed Mon Sep 17 00:00:00 2001 From: Daniel Mursa Date: Tue, 4 Feb 2025 10:55:00 +0100 Subject: [PATCH] [maykinmedia/open-api-framework#104] Update quick-start.yml --- .github/workflows/quick_start.yml | 41 ++++++++++--------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/.github/workflows/quick_start.yml b/.github/workflows/quick_start.yml index 3201673..d014a4b 100644 --- a/.github/workflows/quick_start.yml +++ b/.github/workflows/quick_start.yml @@ -1,31 +1,16 @@ -name: quick-start +name: Quick Start -on: [push] +on: + push: + branches: + - master + pull_request: + branches: + - '**' + workflow_dispatch: 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" >&2 - exit 1 - fi + open-api-workflow-quick-start: + uses: maykinmedia/open-api-workflows/.github/workflows/quick-start.yml@v4.2.0 + with: + fixtures: 'demodata' \ No newline at end of file