diff --git a/.github/workflows/ci-e2e.yml b/.github/workflows/ci-e2e.yml index bfbb17250..9ab8ca2ab 100644 --- a/.github/workflows/ci-e2e.yml +++ b/.github/workflows/ci-e2e.yml @@ -16,35 +16,26 @@ jobs: RUN_SERVICES: true E2E: true TZ: Australia/Sydney + CYPRESS_SCREENSHOTS_FOLDER: /tmp/cypress steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - cache: 'pip' - cache-dependency-path: 'server/requirements.txt' - - name: Setup Environment - run: ./scripts/ci-install.sh - - name: Build Client + - run: | + npm install + npm build + docker compose up -d + ./ci-wait-for-services.sh working-directory: ./e2e - run: npm run build - - name: Start Services - run: ./scripts/ci-start-services.sh - name: E2E Suite A if: matrix.e2e == 'a' working-directory: ./e2e run: npm run cypress-ci -- --spec "cypress/e2e/events/*.cy.ts" - env: - CYPRESS_SCREENSHOTS_FOLDER: /tmp/cypress - name: E2E Suite B if: matrix.e2e == 'b' working-directory: ./e2e run: npm run cypress-ci -- --spec "cypress/e2e/!(events)/*.cy.ts|cypress/e2e/workqueue.cy.ts" - env: - CYPRESS_SCREENSHOTS_FOLDER: /tmp/cypress - name: Upload screenshots if: ${{ failure() }} uses: actions/upload-artifact@v2 diff --git a/scripts/ci-wait-for-services.sh b/scripts/ci-wait-for-services.sh new file mode 100755 index 000000000..2f19e0496 --- /dev/null +++ b/scripts/ci-wait-for-services.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +while ! curl -sfo /dev/null 'http://localhost:9200/'; do echo -n '.' && sleep .5; done \ No newline at end of file