fix CI: run docker compose commands directly in workflow instead of s… #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| e2e-tests: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| - name: Install dependencies | ||
| run: | | ||
| cd mock-project | ||
| npm ci | ||
| - name: Install Playwright browsers | ||
| run: | | ||
| cd mock-project | ||
| npx playwright install chromium | ||
| - name: Start containers | ||
| run: | | ||
| cd mock-project | ||
| docker compose up --build -d | ||
| - name: Wait for API to be ready | ||
| run: | | ||
| sleep 10 | ||
| curl --retry 5 --retry-delay 2 --retry-connrefused http://localhost:5000/health || true | ||
| - name: Run Playwright tests | ||
| run: | | ||
| cd mock-project | ||
| npx playwright test | ||
| - name: Stop containers | ||
| run: | | ||
| cd mock-project | ||
| docker compose down | ||