diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0116d65769..c156bb6517 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ env: NG_CLI_ANALYTICS: ci jobs: - build-and-test-dev-image: + build-and-test-prod-image: timeout-minutes: 60 runs-on: ubuntu-latest steps: @@ -27,13 +27,27 @@ jobs: uses: actions/checkout@v3 with: path: "./openslides-client" - - name: Start dev setup - run: make run-dev ARGS="-d" + - name: Start setup + run: | + cp openslides-backend/global/data/example-data.json openslides-datastore-service/cli/ + cd dev/localprod/ + ./setup.sh + sed -i '/x-default-environment/a \ \ DATASTORE_INITIAL_DATA_FILE: cli/example-data.json' docker-compose.yml + docker-compose build --parallel + docker-compose up -d - name: Wait for dev setup uses: iFaxity/wait-on-action@v1.1.0 with: resource: https://localhost:8000 - timeout: 330000 + timeout: 30000 + - name: Setup initial data + run: | + cd dev/localprod/ + docker-compose exec datastoreWriter python cli/create_initial_data.py + - name: Create initial data + run: | + cd dev/localprod/ + ./openslides initial-data - name: Start tests working-directory: "./openslides-client" run: make run-playwright @@ -43,9 +57,11 @@ jobs: name: playwright-report path: "./openslides-client/client/tests/playwright-report/" retention-days: 7 - - name: Shut down dev setup + - name: Shut down setup if: always() - run: make stop-dev + run: | + cd dev/localprod/ + docker-compose down --volumes --remove-orphans build-and-check-dev-image: runs-on: ubuntu-latest