π Major Angular Upgrade: v11.2.14 β v20.2.3 (Latest Stable) with Modern E2E Testing #42
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: E2E | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ '**' ] | |
| jobs: | |
| test-e2e: | |
| runs-on: ubuntu-latest | |
| env: | |
| CI: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| - name: Show Node/npm versions | |
| run: | | |
| node -v | |
| npm -v | |
| - name: Setup Chrome | |
| uses: browser-actions/setup-chrome@v1 | |
| - name: Cache npm | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm- | |
| - name: Install dependencies | |
| run: npm ci --no-audit --no-fund | |
| - name: Prepare E2E config and data fixtures | |
| run: | | |
| mkdir -p src/assets/data | |
| cat > src/assets/config.json << 'JSON' | |
| { | |
| "perPage": 50, | |
| "pageSize": 8, | |
| "usePreGeneratedFile": true, | |
| "preGeneratedFileUrl": "assets/data/catalogue.json", | |
| "globalSearch": false, | |
| "tabs": { | |
| "All Modules": { | |
| "topic": "e2e-topic", | |
| "org": "e2e-org", | |
| "path": "/module" | |
| } | |
| } | |
| } | |
| JSON | |
| cat > src/assets/data/catalogue.json << 'JSON' | |
| { | |
| "organizations": { | |
| "e2e-org": { | |
| "e2e-topic": [] | |
| } | |
| } | |
| } | |
| JSON | |
| - name: Run unit tests (headless) | |
| run: npm run test-ci -- --browsers=ChromeHeadless | |
| - name: Run E2E tests (Protractor, headless) | |
| run: npm run e2e -- --configuration=e2e --webdriver-update=false |