3.0.2 #57
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: Web Components E2E | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| wc-e2e: | |
| name: WC HTML + Playwright | |
| runs-on: ubuntu-latest | |
| env: | |
| NPM_CONFIG_OPTIONAL: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node 24 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install dependencies (allow peer mismatch) | |
| run: npm ci --legacy-peer-deps | |
| - name: Ensure Rollup binary (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| set -e | |
| ROLLUP_VERSION=$(node -p "require('./package-lock.json').packages['node_modules/rollup']?.version || ''") | |
| echo "Detected rollup version: ${ROLLUP_VERSION}" | |
| if [ -n "$ROLLUP_VERSION" ]; then | |
| npm i -D --no-audit --no-fund "@rollup/rollup-linux-x64-gnu@${ROLLUP_VERSION}" | |
| else | |
| echo "Rollup not found in package-lock.json; skipping explicit binary install" | |
| fi | |
| - name: Build library | |
| run: npm run build | |
| - name: Prepare HTML example with WC bundle | |
| run: | | |
| mkdir -p playwright/html | |
| cp dist/web-components/index.umd.js playwright/html/wc.js | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps | |
| - name: Run WC smoke test (webServer managed) | |
| working-directory: playwright | |
| env: | |
| BASE_URL: http://127.0.0.1:3002 | |
| WEB_SERVER_CMD: python3 -m http.server 3002 --bind 127.0.0.1 --directory html | |
| CI: "1" | |
| run: npx playwright test e2e/wc.spec.ts --config=playwright.config.ts --workers=1 |