Add attach to existing browser #94
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: CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Run tests on Node.js ${{ matrix.node-version }} | |
| runs-on: self-hosted-arc | |
| strategy: | |
| matrix: | |
| node-version: [18, 20, 22, 24] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" | |
| - name: Cache Testplane browsers | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.testplane | |
| key: ${{ runner.os }}-testplane-${{ matrix.browser }} | |
| restore-keys: | | |
| ${{ runner.os }}-testplane-${{ matrix.browser }}- | |
| ${{ runner.os }}-testplane- | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run build | |
| run: npm run build | |
| - name: Preload browser | |
| env: | |
| DISABLE_BROWSER_SANDBOX: true | |
| run: | | |
| timeout 90s npm run ci:preload-browser || echo "Browser setup completed" | |
| - name: Run tests | |
| env: | |
| DISABLE_BROWSER_SANDBOX: true | |
| run: npm test |