E2E All Versions Tests #19
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 All Versions Tests | |
| # This workflow tests compatibility between different published versions of UIX packages | |
| # It installs specific versions from the public npm registry and runs E2E tests | |
| on: workflow_dispatch | |
| jobs: | |
| e2e-tests: | |
| name: Run E2E Tests with TestCafe | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| host-app-version: [ "0.8.5", "0.9.2", "0.10.3", "0.10.4", "1.0.0", "1.0.5", "1.1.3", "1.1.4" ] | |
| guest-app-version: [ "0.8.5", "0.9.2", "0.10.3", "0.10.4", "1.0.0", "1.0.5", "1.1.3", "1.1.4" ] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20.19.5' | |
| - name: Remove any cached npm config | |
| run: | | |
| rm -f ~/.npmrc | |
| rm -f .npmrc | |
| npm config set registry https://registry.npmjs.org/ | |
| npm config set @adobe:registry https://registry.npmjs.org/ | |
| - name: Clean package-lock files | |
| run: | | |
| rm -f e2e/all-versions/host-app/package-lock.json | |
| rm -f e2e/all-versions/guest-app/package-lock.json | |
| - name: Install Dependencies for Host App | |
| working-directory: e2e/all-versions/host-app | |
| run: | | |
| npm install @adobe/uix-host-react@${{ matrix.host-app-version }} | |
| npm install @adobe/uix-host@${{ matrix.host-app-version }} | |
| npm install @adobe/uix-core@${{ matrix.host-app-version }} | |
| npm install | |
| - name: Install Dependencies for Guest App | |
| working-directory: e2e/all-versions/guest-app | |
| run: | | |
| npm install @adobe/uix-guest@${{ matrix.guest-app-version }} | |
| npm install @adobe/uix-core@${{ matrix.guest-app-version }} | |
| npm install | |
| - name: Start Host App | |
| working-directory: e2e/all-versions/host-app | |
| run: | | |
| PORT=3000 npm start & | |
| - name: Start Guest App | |
| working-directory: e2e/all-versions/guest-app | |
| run: | | |
| PORT=3002 npm start & | |
| - name: Wait for Applications to be Ready | |
| run: | | |
| echo "Waiting for services to start..." | |
| sleep 10 | |
| npm install -g wait-on | |
| - name: Wait for servers to start | |
| run: | | |
| wait-on http://localhost:3000 http://localhost:3002 --timeout 60000 | |
| - name: Run E2E Tests with TestCafe | |
| working-directory: e2e/all-versions/e2e-tests | |
| run: | | |
| npm install | |
| npm test |