name: "yarn integration" on: workflow_call: inputs: head_sha: required: true type: string env: NODE: "22" FRONTEND_MONOREPO_DIR: "web" jobs: main: name: "yarn integration" runs-on: ubuntu-latest timeout-minutes: 60 steps: - uses: hmarr/debug-action@v3.0.0 - name: Configure git shell: bash run: | set -xeuo pipefail git config --global user.name 'robot-ci-heartex' git config --global user.email 'robot-ci-heartex@users.noreply.github.com' - name: Checkout uses: actions/checkout@v6 with: ref: ${{ inputs.ref }} - name: Setup frontend environment uses: ./.github/actions/setup-frontend-environment with: node-version: "${{ env.NODE }}" directory: "${{ env.FRONTEND_MONOREPO_DIR }}" - name: Run server id: run-server timeout-minutes: 2 working-directory: ${{ env.FRONTEND_MONOREPO_DIR }} env: NODE_ENV: development run: | set -xeuo pipefail yarn lsf:serve & pid=$! echo "pid=${pid}" >> $GITHUB_OUTPUT while ! curl -s -o /dev/null -L "http://localhost:3000"; do echo "=> Waiting for service to become available" sleep 2s done - name: Run tests working-directory: ${{ env.FRONTEND_MONOREPO_DIR }} run: | COLLECT_COVERAGE=1 yarn test:integration - name: Upload coverage to Codecov if: ${{ always() && github.event.pull_request.head.repo.fork == false && github.event.pull_request.user.login != 'dependabot[bot]' }} uses: codecov/codecov-action@v5 with: name: lsf-integration flags: lsf-integration files: web/libs/editor/.nyc_output/out.json token: ${{ secrets.CODECOV_TOKEN }} verbose: true fail_ci_if_error: true - name: Upload coverage uses: actions/upload-artifact@v6 if: always() with: name: cypress coverage path: web/libs/editor/coverage - name: Upload test results and screenshots uses: actions/upload-artifact@v6 if: always() with: name: cypress test output path: | dist/cypress/libs/frontend-test/src/screenshots dist/cypress/libs/frontend-test/src/videos - name: Kill server if: always() continue-on-error: true run: kill -9 "${{ steps.run-server.outputs.pid }}"