Fix Chrome launcher and clipboard test issues #128
Workflow file for this run
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: Test CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| unit-tests: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run linting | |
| run: npm run lint | |
| - name: Run unit tests | |
| run: npm test -- --watch=false --browsers=ChromeHeadless | |
| env: | |
| FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_TEST_PROJECT_ID }} | |
| FIREBASE_API_KEY: ${{ secrets.FIREBASE_TEST_API_KEY }} | |
| FIREBASE_AUTH_DOMAIN: ${{ secrets.FIREBASE_TEST_AUTH_DOMAIN }} | |
| FIREBASE_APP_ID: ${{ secrets.FIREBASE_TEST_APP_ID }} | |
| - name: Upload coverage reports | |
| uses: codecov/codecov-action@v4 | |
| if: always() | |
| with: | |
| file: ./coverage/lcov.info | |
| flags: unittests | |
| name: codecov-umbrella | |
| e2e-tests: | |
| name: E2E Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Build application | |
| run: npm run build -- --configuration=test | |
| - name: Start Firebase emulators | |
| run: | | |
| npm install -g firebase-tools | |
| firebase emulators:start --only auth,hosting,functions --project demo-test-project & | |
| sleep 10 | |
| - name: Run E2E tests | |
| run: npm run test:e2e | |
| env: | |
| # Firebase emulator configuration | |
| FIREBASE_AUTH_EMULATOR_HOST: localhost:9099 | |
| FIREBASE_FUNCTIONS_EMULATOR_HOST: localhost:5001 | |
| # Test credentials | |
| TEST_USER_EMAIL: ${{ secrets.TEST_USER_EMAIL }} | |
| TEST_USER_PASSWORD: ${{ secrets.TEST_USER_PASSWORD }} | |
| TEST_ADMIN_EMAIL: ${{ secrets.TEST_ADMIN_EMAIL }} | |
| TEST_ADMIN_PASSWORD: ${{ secrets.TEST_ADMIN_PASSWORD }} | |
| # Playwright configuration | |
| HEADLESS_BROWSER: true | |
| CI: true | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 30 | |
| build: | |
| name: Build Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build production | |
| run: npm run build | |
| - name: Check build size | |
| run: | | |
| echo "Build size report:" | |
| du -sh dist/ |