feat(opportunity): introduce opportunity system and enhance localization #713
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
| name: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # --- Backend Tests --- | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "requirements.txt" | |
| - name: Install Python dependencies | |
| run: | | |
| uv pip install --system -r requirements.txt | |
| uv pip install --system pytest pytest-cov pytest-xdist | |
| - name: Run backend tests with coverage in parallel | |
| run: pytest -n auto --dist loadfile -v --cov=src --cov-report=xml --cov-report=term --cov-fail-under=60 | |
| # --- Frontend Tests --- | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: web/package-lock.json | |
| - name: Install Node dependencies | |
| working-directory: web | |
| run: npm ci | |
| - name: Install Playwright browser | |
| working-directory: web | |
| run: npx playwright install --with-deps chromium | |
| - name: Run frontend type check | |
| working-directory: web | |
| run: npm run type-check | |
| - name: Run frontend tests with coverage | |
| working-directory: web | |
| run: npm run test:coverage | |
| - name: Build frontend production bundle | |
| working-directory: web | |
| run: npm run build | |
| - name: Run frontend production smoke | |
| working-directory: web | |
| env: | |
| CWS_SMOKE_MOCK_API: "1" | |
| run: npm run smoke:production | |
| - name: Upload Playwright report | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: frontend-production-smoke-report | |
| path: | | |
| web/playwright-report/ | |
| web/test-results/ | |
| if-no-files-found: ignore | |
| # --- Upload Coverage --- | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./coverage.xml,./web/coverage/coverage-final.json | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} |